diff options
author | Martin Schwenke <martin@meltin.net> | 2019-06-08 06:40:40 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2019-07-05 05:03:23 +0000 |
commit | c39441f62d9a05d2a329dd43a17e51374293de90 (patch) | |
tree | dce1e6e02187d71ea726bc07bcd8112e56f0a6ab /ctdb | |
parent | 76e930d784e3ea4d8f2076ffc0035a12500db260 (diff) | |
download | samba-c39441f62d9a05d2a329dd43a17e51374293de90.tar.gz |
ctdb-daemon: Fix signed/unsigned comparisons by using constant
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_takeover.c | 6 | ||||
-rw-r--r-- | ctdb/server/ctdb_takeover_helper.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 844e3c32866..3ac569a953a 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -298,7 +298,7 @@ static void ctdb_vnn_unassign_iface(struct ctdb_context *ctdb, } vnn->iface = NULL; if (vnn->pnn == ctdb->pnn) { - vnn->pnn = -1; + vnn->pnn = CTDB_UNKNOWN_PNN; } } @@ -772,7 +772,7 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb, return -1; } - if (vnn->pnn != ctdb->pnn && have_ip && vnn->pnn != -1) { + if (vnn->pnn != ctdb->pnn && have_ip && vnn->pnn != CTDB_UNKNOWN_PNN) { DEBUG(DEBUG_CRIT,(__location__ " takeoverip of IP %s is known to the kernel, " "and we have it on iface[%s], but it was assigned to node %d" "and we are node %d, banning ourself\n", @@ -782,7 +782,7 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb, return -1; } - if (vnn->pnn == -1 && have_ip) { + if (vnn->pnn == CTDB_UNKNOWN_PNN && have_ip) { /* This will cause connections to be reset and * reestablished. However, this is a very unusual * situation and doing this will completely repair the diff --git a/ctdb/server/ctdb_takeover_helper.c b/ctdb/server/ctdb_takeover_helper.c index 8740838cfdd..254b48f0759 100644 --- a/ctdb/server/ctdb_takeover_helper.c +++ b/ctdb/server/ctdb_takeover_helper.c @@ -466,7 +466,7 @@ static struct tevent_req *take_ip_send(TALLOC_CTX *mem_ctx, struct take_ip_one_state *substate; struct ctdb_public_ip ip; - if (tmp_ip->pnn == -1) { + if (tmp_ip->pnn == CTDB_UNKNOWN_PNN) { /* IP will be unassigned */ continue; } |