aboutsummaryrefslogtreecommitdiffstats
path: root/ipc.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-01-16 16:50:24 -0300
committerdequis <dx@dxzone.com.ar>2015-01-16 16:50:24 -0300
commita6cd799ce11c9792ed3e817d947ccef19cc6aee0 (patch)
tree424e732c3b778fbd34583d2d5025476f55b991d7 /ipc.c
parent25c4c78e2ddad482dfc9d5a104f76325fcc2f8e5 (diff)
ipc_child_identify: fix a maybe-uninitialized warning
Diffstat (limited to 'ipc.c')
-rw-r--r--ipc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc.c b/ipc.c
index a9b4304b..ef4946ff 100644
--- a/ipc.c
+++ b/ipc.c
@@ -462,7 +462,7 @@ gboolean ipc_child_identify( irc_t *irc )
else if( global.conf->runmode == RUNMODE_DAEMON )
{
GSList *l;
- irc_t *old;
+ irc_t *old = NULL;
char *to_init[] = { "TAKEOVER", "INIT", NULL };
for( l = irc_connection_list; l; l = l->next )
@@ -476,7 +476,7 @@ gboolean ipc_child_identify( irc_t *irc )
strcmp( irc->password, old->password ) == 0 )
break;
}
- if( l == NULL ||
+ if( l == NULL || old == NULL ||
!set_getbool( &irc->b->set, "allow_takeover" ) ||
!set_getbool( &old->b->set, "allow_takeover" ) )
return FALSE;