diff options
author | Michael Adam <obnox@samba.org> | 2008-03-27 18:01:43 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-27 18:14:57 +0100 |
commit | f8fdc36fdb36fa9e7af004a49230ef3e697f6fe7 (patch) | |
tree | 7f8b55a9616bdb50878b5aef6388a06593eee3b3 /source3 | |
parent | 04ae7b85ea24310cbef34ac20a0b82bcdb714192 (diff) | |
download | samba-f8fdc36fdb36fa9e7af004a49230ef3e697f6fe7.tar.gz samba-f8fdc36fdb36fa9e7af004a49230ef3e697f6fe7.tar.bz2 samba-f8fdc36fdb36fa9e7af004a49230ef3e697f6fe7.zip |
regdb: use == 0 (instead of != -1) as indicator for success of dbwrap_trans_[delete|store]()
Michael
(This used to be commit 7dcd0c1e539df9ff1768a9c878b6687b9e1bfeac)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/registry/reg_backend_db.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c index 44fb5caeb9..ad17068295 100644 --- a/source3/registry/reg_backend_db.c +++ b/source3/registry/reg_backend_db.c @@ -986,10 +986,10 @@ static WERROR regdb_set_secdesc(const char *key, /* assuming a delete */ tdb_ret = dbwrap_trans_delete(regdb, string_term_tdb_data(tdbkey)); - if (tdb_ret == -1) { - err = ntstatus_to_werror(map_nt_error_from_unix(errno)); - } else { + if (tdb_ret == 0) { err = WERR_OK; + } else { + err = ntstatus_to_werror(map_nt_error_from_unix(errno)); } goto done; } @@ -1003,7 +1003,7 @@ static WERROR regdb_set_secdesc(const char *key, tdb_ret = dbwrap_trans_store(regdb, string_term_tdb_data(tdbkey), tdbdata, 0); - if (tdb_ret == -1) { + if (tdb_ret != 0) { err = ntstatus_to_werror(map_nt_error_from_unix(errno)); goto done; } |