ctdb-recoverd: Simplify return values when updating local flags
authorMartin Schwenke <martin@meltin.net>
Wed, 27 Apr 2016 11:47:08 +0000 (21:47 +1000)
committerMartin Schwenke <martins@samba.org>
Fri, 6 May 2016 09:39:09 +0000 (11:39 +0200)
Change this to return just 0 or -1.  It isn't monitoring anything.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_recoverd.c

index bebd37486a2b3a218b9da3a731220d87e17ee7b5..186d076eb3d65fded7dc190a927aa99413c9c769 100644 (file)
@@ -1235,7 +1235,7 @@ static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map_ol
                                  nodemap->nodes[j].pnn));
                        ctdb_set_culprit(rec, nodemap->nodes[j].pnn);
                        talloc_free(mem_ctx);
-                       return MONITOR_FAILED;
+                       return -1;
                }
                if (nodemap->nodes[j].flags != remote_nodemap->nodes[j].flags) {
                        /* We should tell our daemon about this so it
@@ -1261,7 +1261,7 @@ static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map_ol
                talloc_free(remote_nodemap);
        }
        talloc_free(mem_ctx);
-       return MONITOR_OK;
+       return 0;
 }
 
 
@@ -3622,7 +3622,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 
        /* ensure our local copies of flags are right */
        ret = update_local_flags(rec, nodemap);
-       if (ret != MONITOR_OK) {
+       if (ret != 0) {
                DEBUG(DEBUG_ERR,("Unable to update local flags\n"));
                return;
        }