diff options
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/dbwrap/dbwrap_tdb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/dbwrap/dbwrap_tdb.c b/source3/lib/dbwrap/dbwrap_tdb.c index f3528a98c1..a861974fb6 100644 --- a/source3/lib/dbwrap/dbwrap_tdb.c +++ b/source3/lib/dbwrap/dbwrap_tdb.c @@ -168,7 +168,7 @@ static int db_tdb_fetch(struct db_context *db, TALLOC_CTX *mem_ctx, ret = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_fetch_parse, &state); - if (ret < 0) { + if (ret != 0) { return -1; } @@ -188,7 +188,7 @@ static int db_tdb_parse(struct db_context *db, TDB_DATA key, struct db_tdb_ctx *ctx = talloc_get_type_abort( db->private_data, struct db_tdb_ctx); - return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data); + return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data) ? -1 : 0; } static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag) @@ -318,14 +318,14 @@ static int db_tdb_transaction_start(struct db_context *db) { struct db_tdb_ctx *db_ctx = talloc_get_type_abort(db->private_data, struct db_tdb_ctx); - return tdb_transaction_start(db_ctx->wtdb->tdb); + return tdb_transaction_start(db_ctx->wtdb->tdb) ? -1 : 0; } static int db_tdb_transaction_commit(struct db_context *db) { struct db_tdb_ctx *db_ctx = talloc_get_type_abort(db->private_data, struct db_tdb_ctx); - return tdb_transaction_commit(db_ctx->wtdb->tdb); + return tdb_transaction_commit(db_ctx->wtdb->tdb) ? -1 : 0; } static int db_tdb_transaction_cancel(struct db_context *db) |