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/torture/torture.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/torture') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 0731326cf9..faa4326489 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -8348,7 +8348,7 @@ static bool run_local_dbtrans(int dummy) } res = db->transaction_start(db); - if (res == -1) { + if (res != 0) { printf(__location__ "transaction_start failed\n"); return false; } @@ -8375,7 +8375,7 @@ static bool run_local_dbtrans(int dummy) TALLOC_FREE(rec); res = db->transaction_commit(db); - if (res == -1) { + if (res != 0) { printf(__location__ "transaction_commit failed\n"); return false; } @@ -8385,7 +8385,7 @@ static bool run_local_dbtrans(int dummy) int i; res = db->transaction_start(db); - if (res == -1) { + if (res != 0) { printf(__location__ "transaction_start failed\n"); break; } @@ -8415,7 +8415,7 @@ static bool run_local_dbtrans(int dummy) printf("val2=%d\r", val2); res = db->transaction_commit(db); - if (res == -1) { + if (res != 0) { printf(__location__ "transaction_commit failed\n"); break; } -- cgit