]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-client: Fix incorrect variable reference
authorMartin Schwenke <martin@meltin.net>
Wed, 20 Jul 2016 04:46:58 +0000 (14:46 +1000)
committerStefan Metzmacher <metze@samba.org>
Wed, 20 Jul 2016 19:27:17 +0000 (21:27 +0200)
The point of this code is almost certainly to return non-zero when
state->errormsg is set.  So, return state->status if non-zero, -1
otherwise.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb/client/ctdb_client.c

index 7e98499b69b5b94b9532905b173e4a65a9053250..19502be184192295205c9d48d38c629fedf9dbb7 100644 (file)
@@ -1178,7 +1178,7 @@ int ctdb_control_recv(struct ctdb_context *ctdb,
                        state->async.fn(state);
                }
                talloc_free(tmp_ctx);
-               return (status == 0 ? -1 : state->status);
+               return (state->status == 0 ? -1 : state->status);
        }
 
        if (outdata) {