Replace magic number with defined constant

And use it to restrict the number of rows retrieved to avoid
overflowing the array.
This commit is contained in:
Ian Barwick
2015-01-08 17:19:02 +09:00
parent 7bafd490c1
commit acf2744ed7
2 changed files with 6 additions and 4 deletions

View File

@@ -46,6 +46,8 @@
#define DEFAULT_DBNAME "postgres"
#define DEFAULT_REPMGR_SCHEMA_PREFIX "repmgr_"
#define FAILOVER_NODES_MAX_CHECK 50
#define MANUAL_FAILOVER 0
#define AUTOMATIC_FAILOVER 1