diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap_util.c | 4 | ||||
-rw-r--r-- | source3/lib/gencache.c | 2 | ||||
-rw-r--r-- | source3/lib/tdb_validate.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/dbwrap_util.c b/source3/lib/dbwrap_util.c index ce5ef52706..44a1b8827b 100644 --- a/source3/lib/dbwrap_util.c +++ b/source3/lib/dbwrap_util.c @@ -433,7 +433,7 @@ static NTSTATUS dbwrap_trans_traverse_action(struct db_context* db, void* privat int ret = db->traverse(db, ctx->f, ctx->private_data); - return (ret == -1) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK; + return (ret < 0) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK; } NTSTATUS dbwrap_trans_traverse(struct db_context *db, @@ -452,7 +452,7 @@ NTSTATUS dbwrap_traverse(struct db_context *db, void *private_data) { int ret = db->traverse(db, f, private_data); - return (ret == -1) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK; + return (ret < 0) ? NT_STATUS_INTERNAL_DB_CORRUPTION : NT_STATUS_OK; } diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index ab7de21d92..d5ca164943 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -488,7 +488,7 @@ bool gencache_stabilize(void) state.written = false; res = tdb_traverse(cache_notrans, stabilize_fn, &state); - if ((res == -1) || state.error) { + if ((res < 0) || state.error) { tdb_transaction_cancel(cache_notrans); tdb_transaction_cancel(cache); return false; diff --git a/source3/lib/tdb_validate.c b/source3/lib/tdb_validate.c index 7dd7dae5ac..210d91eeb0 100644 --- a/source3/lib/tdb_validate.c +++ b/source3/lib/tdb_validate.c @@ -71,7 +71,7 @@ static int tdb_validate_child(struct tdb_context *tdb, num_entries = tdb_traverse(tdb, validate_fn, (void *)&v_status); if (!v_status.success) { goto out; - } else if (num_entries == -1) { + } else if (num_entries < 0) { v_status.tdb_error = True; v_status.success = False; goto out; |