diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 18:40:31 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-06-20 11:18:35 +0200 |
commit | 2b1452b2fc0573e09fedb7fbd8a5f8d278470b9c (patch) | |
tree | 74cf934a3e37ba5e811c8ee4709a021b6ea697da /source3/lib/dbwrap_tdb.c | |
parent | 6bc59d77b64d1ecbe5c906ed2fa80a7b8ca5d420 (diff) | |
download | samba-2b1452b2fc0573e09fedb7fbd8a5f8d278470b9c.tar.gz samba-2b1452b2fc0573e09fedb7fbd8a5f8d278470b9c.tar.bz2 samba-2b1452b2fc0573e09fedb7fbd8a5f8d278470b9c.zip |
tdb_transaction_commit: check returns for 0, not -1.
TDB2 returns a negative error number on failure. This is compatible
if we always check for != 0 instead of == -1.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3/lib/dbwrap_tdb.c')
-rw-r--r-- | source3/lib/dbwrap_tdb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index f8baa0aeca..fc2af28c83 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -323,7 +323,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); + return tdb_transaction_commit(db_ctx->wtdb->tdb) == 0 ? 0 : -1; } static int db_tdb_transaction_cancel(struct db_context *db) |