mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
ctdb-daemon: Improve readability of code by nesting if-statements
ctdb_sys_have_ip() should only be run if if do_publicipcheck is set. This is clearer if written as 2 nested if-statements rather than as a lazy conjuction. Pair-programmed-with: Amitay Isaacs <amitay@gmail.com> Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
40eac8e4d8
commit
3e6660c46f
@ -873,12 +873,16 @@ static void release_ip_callback(struct ctdb_context *ctdb, int status,
|
||||
ctdb_ban_self(ctdb);
|
||||
}
|
||||
|
||||
if (ctdb->do_checkpublicip && ctdb_sys_have_ip(state->addr)) {
|
||||
DEBUG(DEBUG_ERR, ("IP %s still hosted during release IP callback, failing\n",
|
||||
ctdb_addr_to_str(state->addr)));
|
||||
ctdb_request_control_reply(ctdb, state->c, NULL, -1, NULL);
|
||||
talloc_free(state);
|
||||
return;
|
||||
if (ctdb->do_checkpublicip) {
|
||||
if (ctdb_sys_have_ip(state->addr)) {
|
||||
DEBUG(DEBUG_ERR,
|
||||
("IP %s still hosted during release IP callback, failing\n",
|
||||
ctdb_addr_to_str(state->addr)));
|
||||
ctdb_request_control_reply(ctdb, state->c,
|
||||
NULL, -1, NULL);
|
||||
talloc_free(state);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* send a message to all clients of this node telling them
|
||||
|
Loading…
Reference in New Issue
Block a user