summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_g_lock.c2
-rw-r--r--source3/utils/net_serverid.c4
-rw-r--r--source3/utils/status.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/source3/utils/net_g_lock.c b/source3/utils/net_g_lock.c
index bfb9a225ab..f8a7a8b620 100644
--- a/source3/utils/net_g_lock.c
+++ b/source3/utils/net_g_lock.c
@@ -175,7 +175,7 @@ done:
TALLOC_FREE(g_ctx);
TALLOC_FREE(msg);
TALLOC_FREE(ev);
- return ret;
+ return ret < 0 ? -1 : ret;
}
int net_g_lock(struct net_context *c, int argc, const char **argv)
diff --git a/source3/utils/net_serverid.c b/source3/utils/net_serverid.c
index 2c3320f40e..4159eead7a 100644
--- a/source3/utils/net_serverid.c
+++ b/source3/utils/net_serverid.c
@@ -37,7 +37,7 @@ static int net_serverid_list(struct net_context *c, int argc,
const char **argv)
{
d_printf("pid unique_id msg_flags\n");
- return serverid_traverse_read(net_serverid_list_fn, NULL) ? 0 : -1;
+ return serverid_traverse_read(net_serverid_list_fn, NULL) > 0 ? 0 : -1;
}
static int net_serverid_wipe_fn(struct db_record *rec,
@@ -62,7 +62,7 @@ static int net_serverid_wipe_fn(struct db_record *rec,
static int net_serverid_wipe(struct net_context *c, int argc,
const char **argv)
{
- return serverid_traverse(net_serverid_wipe_fn, NULL) ? 0 : -1;
+ return serverid_traverse(net_serverid_wipe_fn, NULL) > 0 ? 0 : -1;
}
static int net_serverid_wipedbs_conn(
diff --git a/source3/utils/status.c b/source3/utils/status.c
index cf625fb73f..4d37f7e66e 100644
--- a/source3/utils/status.c
+++ b/source3/utils/status.c
@@ -474,7 +474,7 @@ static int traverse_sessionid(const char *key, struct sessionid *session,
if (result == 0) {
d_printf("No locked files\n");
- } else if (result == -1) {
+ } else if (result < 0) {
d_printf("locked file list truncated\n");
}