summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/tools/ctdb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 9d46c981a0f..2cc72eedc76 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -3657,7 +3657,8 @@ static int control_reloadnodes(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
struct ctdb_req_control request;
struct ctdb_reply_control **reply;
bool reload;
- unsigned int i, count;
+ unsigned int i;
+ int count;
int ret;
uint32_t *pnn_list;
@@ -3726,13 +3727,14 @@ static int control_reloadnodes(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
&request, NULL, &reply);
if (ret != 0) {
bool failed = false;
+ int j;
- for (i=0; i<count; i++) {
- ret = ctdb_reply_control_reload_nodes_file(reply[i]);
+ for (j=0; j<count; j++) {
+ ret = ctdb_reply_control_reload_nodes_file(reply[j]);
if (ret != 0) {
fprintf(stderr,
"Node %u failed to reload nodes\n",
- pnn_list[i]);
+ pnn_list[j]);
failed = true;
}
}