From 8df79665407b742288b2e7219a1da50d492388e7 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Tue, 13 Jan 2015 13:42:30 +0900 Subject: [PATCH] Rename variable "find_best" sounds like an imperative. --- repmgrd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/repmgrd.c b/repmgrd.c index d29f1939..f3f90f62 100644 --- a/repmgrd.c +++ b/repmgrd.c @@ -829,7 +829,7 @@ do_failover(void) int visible_nodes = 0; int ready_nodes = 0; - bool find_best = false; + bool candidate_found = false; int i; int r; @@ -1127,7 +1127,7 @@ do_failover(void) if (!nodes[i].is_ready || !nodes[i].is_visible) continue; - if (!find_best) + if (!candidate_found) { /* * start with the first ready node, and then move on to the next @@ -1137,7 +1137,7 @@ do_failover(void) best_candidate.xlog_location = nodes[i].xlog_location; best_candidate.is_ready = nodes[i].is_ready; best_candidate.is_witness = nodes[i].is_witness; - find_best = true; + candidate_found = true; } /* @@ -1154,8 +1154,8 @@ do_failover(void) } } - /* No candidate found */ - if (!find_best) + /* Terminate if no candidate found */ + if (!candidate_found) { log_err(_("%s: No suitable candidate for promotion found; terminating.\n"), progname);