tdb_compat: Higher level API fixes.
[kai/samba.git] / source3 / utils / net_idmap_check.c
index e406a65679eb1cd3352f51d03c66ce62e8f3f6ef..3adc060a7c6620a66d5eacb4d83634171a6be9b8 100644 (file)
@@ -346,7 +346,7 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
 {
        TDB_DATA tmp;
 
-       if (ctx->diff->fetch(ctx->diff, mem_ctx, key, &tmp) == -1) {
+       if (ctx->diff->fetch(ctx->diff, mem_ctx, key, &tmp) != 0) {
                DEBUG(0, ("Out of memory!\n"));
                return tdb_null;
        }
@@ -357,7 +357,7 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
                return ret;
        }
 
-       if (ctx->db->fetch(ctx->db, mem_ctx, key, &tmp) == -1) {
+       if (ctx->db->fetch(ctx->db, mem_ctx, key, &tmp) != 0) {
                DEBUG(0, ("Out of memory!\n"));
                return tdb_null;
        }