1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

ctdb-client: Fix incorrect variable reference

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>
This commit is contained in:
Martin Schwenke 2016-07-20 14:46:58 +10:00 committed by Stefan Metzmacher
parent 7fdb5d2c5c
commit 5f57bcc01d

View 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) {