From 4ebc43fd63adcf80a0068eaab5912e377ca2f918 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 14 Aug 2019 14:15:41 +0900 Subject: [PATCH] Clean up variable usage in do_node_status() Variable with the same name existed both at function level and within local code blocks. --- repmgr-action-node.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repmgr-action-node.c b/repmgr-action-node.c index 7c521e5a..59f78dba 100644 --- a/repmgr-action-node.c +++ b/repmgr-action-node.c @@ -71,7 +71,6 @@ do_node_status(void) PQExpBufferData output; KeyValueList node_status = {NULL, NULL}; - KeyValueListCell *cell = NULL; NodeInfoList missing_slots = T_NODE_INFO_LIST_INITIALIZER; ItemList warnings = {NULL, NULL}; @@ -466,6 +465,8 @@ do_node_status(void) if (runtime_options.output_mode == OM_CSV) { + KeyValueListCell *cell = NULL; + appendPQExpBuffer(&output, "\"Node name\",\"%s\"\n", node_info.node_name); @@ -539,6 +540,8 @@ do_node_status(void) } else { + KeyValueListCell *cell = NULL; + appendPQExpBuffer(&output, "Node \"%s\":\n", node_info.node_name);