Initialize connection pointers to NULL

This makes some bugs easier to find.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
This commit is contained in:
Dan Farina
2010-12-10 12:47:09 -08:00
committed by Peter van Hardenberg
parent 84b69b3bd4
commit 3f2094a242

View File

@@ -1,6 +1,8 @@
/*
* repmgrd.c
*
* Copyright (c) 2ndQuadrant, 2010
* Copyright (c) Heroku, 2010
*
* Replication manager daemon
* This module connects to the nodes of a replication cluster and monitors
@@ -23,12 +25,12 @@ char myClusterName[MAXLEN];
/* Local info */
int myLocalMode = STANDBY_MODE;
int myLocalId = -1;
PGconn *myLocalConn;
PGconn *myLocalConn = NULL;
/* Primary info */
int primaryId;
char primaryConninfo[MAXLEN];
PGconn *primaryConn;
PGconn *primaryConn = NULL;
char sqlquery[QUERY_STR_LEN];