ctdb-recovery: Fix signed/unsigned comparison by casting
authorMartin Schwenke <martin@meltin.net>
Thu, 23 May 2019 07:47:24 +0000 (17:47 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 5 Jun 2019 10:25:50 +0000 (10:25 +0000)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c

index 617d8fa28b5853fcb141da311f2e071158e3634a..3e0d84f3935f5d32609a522944730d0cceed7673 100644 (file)
@@ -2256,7 +2256,7 @@ static void verify_recmaster_callback(struct ctdb_client_control_state *state)
        /* if we got a response, then the recmaster will be stored in the
           status field
        */
-       if (state->status != rmdata->pnn) {
+       if ((uint32_t)state->status != rmdata->pnn) {
                DEBUG(DEBUG_ERR,("Node %d thinks node %d is recmaster. Need a new recmaster election\n", state->c->hdr.destnode, state->status));
                ctdb_set_culprit(rmdata->rec, state->c->hdr.destnode);
                rmdata->status = MONITOR_ELECTION_NEEDED;