From d925b327f4703cc141c0a7f3eec912dba8440880 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 20 Jun 2011 18:40:33 +0930 Subject: tdb_compat: Higher level API fixes. My previous patches fixed up all direct TDB callers, but there are a few utility functions and the db_context functions which are still using the old -1 / 0 return codes. It's clearer to fix up all the callers of these too, so everywhere is consistent: non-zero means an error. Signed-off-by: Rusty Russell --- source3/lib/dbwrap_tdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/lib/dbwrap_tdb.c') diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index 2b5f58a56d..2efb3dfe39 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -183,7 +183,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) ? -1 : 0; + return tdb_parse_record(ctx->wtdb->tdb, key, parser, private_data); } static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag) @@ -320,7 +320,7 @@ 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) == 0 ? 0 : -1; + return tdb_transaction_commit(db_ctx->wtdb->tdb); } static int db_tdb_transaction_cancel(struct db_context *db) -- cgit