1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-ipalloc: Fix warning about unused value assigned to srcimbl

To make this much clearer, move the declaration into the scope where
it is used.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2019-05-30 15:41:42 +10:00 committed by Amitay Isaacs
parent 7df15b246a
commit 2db0e71d3b

View File

@ -309,13 +309,12 @@ static bool lcp2_failback_candidate(struct ipalloc_state *ipalloc_state,
bool *rebalance_candidates)
{
unsigned int dstnode, mindstnode, numnodes;
uint32_t srcimbl, srcdsum, dstimbl, dstdsum;
uint32_t srcdsum, dstimbl, dstdsum;
uint32_t minsrcimbl, mindstimbl;
struct public_ip_list *minip;
struct public_ip_list *t;
/* Find an IP and destination node that best reduces imbalance. */
srcimbl = 0;
minip = NULL;
minsrcimbl = 0;
mindstnode = CTDB_UNKNOWN_PNN;
@ -328,6 +327,8 @@ static bool lcp2_failback_candidate(struct ipalloc_state *ipalloc_state,
srcnode, lcp2_imbalances[srcnode]));
for (t = ipalloc_state->all_ips; t != NULL; t = t->next) {
uint32_t srcimbl;
/* Only consider addresses on srcnode. */
if (t->pnn != srcnode) {
continue;