mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-27 17:06:29 +00:00
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:
committed by
Peter van Hardenberg
parent
84b69b3bd4
commit
3f2094a242
@@ -1,6 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* repmgrd.c
|
* repmgrd.c
|
||||||
|
*
|
||||||
* Copyright (c) 2ndQuadrant, 2010
|
* Copyright (c) 2ndQuadrant, 2010
|
||||||
|
* Copyright (c) Heroku, 2010
|
||||||
*
|
*
|
||||||
* Replication manager daemon
|
* Replication manager daemon
|
||||||
* This module connects to the nodes of a replication cluster and monitors
|
* This module connects to the nodes of a replication cluster and monitors
|
||||||
@@ -23,12 +25,12 @@ char myClusterName[MAXLEN];
|
|||||||
/* Local info */
|
/* Local info */
|
||||||
int myLocalMode = STANDBY_MODE;
|
int myLocalMode = STANDBY_MODE;
|
||||||
int myLocalId = -1;
|
int myLocalId = -1;
|
||||||
PGconn *myLocalConn;
|
PGconn *myLocalConn = NULL;
|
||||||
|
|
||||||
/* Primary info */
|
/* Primary info */
|
||||||
int primaryId;
|
int primaryId;
|
||||||
char primaryConninfo[MAXLEN];
|
char primaryConninfo[MAXLEN];
|
||||||
PGconn *primaryConn;
|
PGconn *primaryConn = NULL;
|
||||||
|
|
||||||
char sqlquery[QUERY_STR_LEN];
|
char sqlquery[QUERY_STR_LEN];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user