mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Avoid defining variable-length arrays
As of PostgreSQL commit d9dd406f, variable length arrays are no longer permitted. As they're not actually required anyway, just define appropriate constants. Also noted in GitHub #510.
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
#include "controldata.h"
|
||||
#include "dirutil.h"
|
||||
|
||||
#define NODE_RECORD_PARAM_COUNT 11
|
||||
|
||||
/* mainly for use by repmgrd */
|
||||
int server_version_num = UNKNOWN_SERVER_VERSION_NUM;
|
||||
|
||||
@@ -2478,8 +2480,8 @@ _create_update_node_record(PGconn *conn, char *action, t_node_info *node_info)
|
||||
|
||||
char *slot_name_ptr = NULL;
|
||||
|
||||
int param_count = 11;
|
||||
const char *param_values[param_count];
|
||||
int param_count = NODE_RECORD_PARAM_COUNT;
|
||||
const char *param_values[NODE_RECORD_PARAM_COUNT];
|
||||
|
||||
PGresult *res;
|
||||
bool success = true;
|
||||
|
||||
Reference in New Issue
Block a user