summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c4
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_search.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index 0e9f1e75dd..45c36f09c9 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -1569,7 +1569,7 @@ int ltdb_reindex(struct ldb_module *module)
* putting NULL entries in the in-memory tdb
*/
ret = tdb_traverse(ltdb->tdb, delete_index, module);
- if (ret == -1) {
+ if (ret < 0) {
return LDB_ERR_OPERATIONS_ERROR;
}
@@ -1583,7 +1583,7 @@ int ltdb_reindex(struct ldb_module *module)
/* now traverse adding any indexes for normal LDB records */
ret = tdb_traverse(ltdb->tdb, re_index, &ctx);
- if (ret == -1) {
+ if (ret < 0) {
struct ldb_context *ldb = ldb_module_get_ctx(module);
ldb_asprintf_errstring(ldb, "reindexing traverse failed: %s", ldb_errstring(ldb));
return LDB_ERR_OPERATIONS_ERROR;
diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c
index 30364897d9..46e2d74998 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_search.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_search.c
@@ -480,7 +480,7 @@ static int ltdb_search_full(struct ltdb_context *ctx)
ret = tdb_traverse_read(ltdb->tdb, search_func, ctx);
}
- if (ret == -1) {
+ if (ret < 0) {
return LDB_ERR_OPERATIONS_ERROR;
}