update "ctdb pnn" to use the new return value for _recv() where
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 5 Jun 2010 04:38:01 +0000 (14:38 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 5 Jun 2010 04:38:01 +0000 (14:38 +1000)
bool false means failure and true means success.

tools/ctdb.c

index b7e7df36b64c40de055adc4415f1ef13412f7dbc..6299b79f9626c172e94e7b142f042371cfd7e2aa 100644 (file)
@@ -384,10 +384,10 @@ static int control_uptime(struct ctdb_context *ctdb, int argc, const char **argv
 static int control_pnn(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        uint32_t mypnn;
-       int ret;
+       bool ret;
 
        ret = ctdb_getpnn(ctdb_connection, options.pnn, &mypnn);
-       if (ret != 0) {
+       if (!ret) {
                DEBUG(DEBUG_ERR, ("Unable to get pnn from node."));
                return -1;
        }