summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-27 17:44:36 +0100
committerMichael Adam <obnox@samba.org>2008-03-27 18:14:57 +0100
commitc86d10ae83c4f92d3f382ecd0ea9f6d029cf0612 (patch)
tree2513df52976feac06e24b7e221b01ec55df00452 /source3
parentdbd2e3860dc5855833da0673427ac655e99d33d3 (diff)
downloadsamba-c86d10ae83c4f92d3f382ecd0ea9f6d029cf0612.tar.gz
samba-c86d10ae83c4f92d3f382ecd0ea9f6d029cf0612.tar.bz2
samba-c86d10ae83c4f92d3f382ecd0ea9f6d029cf0612.zip
regdb: use != 0 instead of == -1 check for transaction_[commit|cancel]
Michael (This used to be commit b6ceeaabae94b86fe79d6a60e497fb472ca23021)
Diffstat (limited to 'source3')
-rw-r--r--source3/registry/reg_backend_db.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 3234e7447e..44fb5caeb9 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -194,7 +194,7 @@ bool init_registry_key(const char *add_path)
goto fail;
}
- if (regdb->transaction_commit(regdb) == -1) {
+ if (regdb->transaction_commit(regdb) != 0) {
DEBUG(0, ("init_registry_key: Could not commit transaction\n"));
return false;
}
@@ -202,7 +202,7 @@ bool init_registry_key(const char *add_path)
return true;
fail:
- if (regdb->transaction_cancel(regdb) == -1) {
+ if (regdb->transaction_cancel(regdb) != 0) {
smb_panic("init_registry_key: transaction_cancel failed\n");
}
@@ -294,7 +294,7 @@ bool init_registry_data(void)
TALLOC_FREE(frame);
- if (regdb->transaction_commit(regdb) == -1) {
+ if (regdb->transaction_commit(regdb) != 0) {
DEBUG(0, ("init_registry_data: Could not commit "
"transaction\n"));
return false;
@@ -306,7 +306,7 @@ bool init_registry_data(void)
TALLOC_FREE(frame);
- if (regdb->transaction_cancel(regdb) == -1) {
+ if (regdb->transaction_cancel(regdb) != 0) {
smb_panic("init_registry_data: tdb_transaction_cancel "
"failed\n");
}
@@ -671,7 +671,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
TALLOC_FREE(path);
}
- if (regdb->transaction_commit(regdb) == -1) {
+ if (regdb->transaction_commit(regdb) != 0) {
DEBUG(0, ("regdb_store_keys: Could not commit transaction\n"));
goto fail;
}
@@ -680,7 +680,7 @@ bool regdb_store_keys(const char *key, REGSUBKEY_CTR *ctr)
return true;
cancel:
- if (regdb->transaction_cancel(regdb) == -1) {
+ if (regdb->transaction_cancel(regdb) != 0) {
smb_panic("regdb_store_keys: transaction_cancel failed\n");
}