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 | 9850f256337d70401d962bb1f6d5b834a221358d (patch) | |
tree | 1e3d01a156da09aab6a3bb9b0fb66d8cd36ab7d9 /source3 | |
parent | 868d77bc5b38e628f74d5cd03c5f87eb5a666b09 (diff) | |
download | samba-9850f256337d70401d962bb1f6d5b834a221358d.tar.gz samba-9850f256337d70401d962bb1f6d5b834a221358d.tar.bz2 samba-9850f256337d70401d962bb1f6d5b834a221358d.zip |
tdb_chainunlock: ignore return value.
TDB2 returns void here. tdb_chainunlock will *always* return with the
chain unlocked, but it will complain via the log function if it wasn't
locked.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/dbwrap_ctdb.c | 5 | ||||
-rw-r--r-- | source3/lib/dbwrap_tdb.c | 5 | ||||
-rw-r--r-- | source3/libsmb/smb_share_modes.c | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/source3/lib/dbwrap_ctdb.c b/source3/lib/dbwrap_ctdb.c index 45c134cf80..255a673020 100644 --- a/source3/lib/dbwrap_ctdb.c +++ b/source3/lib/dbwrap_ctdb.c @@ -994,10 +994,7 @@ static int db_ctdb_record_destr(struct db_record* data) hex_encode_talloc(data, (unsigned char *)data->key.dptr, data->key.dsize))); - if (tdb_chainunlock(crec->ctdb_ctx->wtdb->tdb, data->key) != 0) { - DEBUG(0, ("tdb_chainunlock failed\n")); - return -1; - } + tdb_chainunlock(crec->ctdb_ctx->wtdb->tdb, data->key); threshold = lp_ctdb_locktime_warn_threshold(); if (threshold != 0) { diff --git a/source3/lib/dbwrap_tdb.c b/source3/lib/dbwrap_tdb.c index 2ed368ee97..0832b06a15 100644 --- a/source3/lib/dbwrap_tdb.c +++ b/source3/lib/dbwrap_tdb.c @@ -43,10 +43,7 @@ static int db_tdb_record_destr(struct db_record* data) hex_encode_talloc(data, (unsigned char *)data->key.dptr, data->key.dsize))); - if (tdb_chainunlock(ctx->wtdb->tdb, data->key) != 0) { - DEBUG(0, ("tdb_chainunlock failed\n")); - return -1; - } + tdb_chainunlock(ctx->wtdb->tdb, data->key); return 0; } diff --git a/source3/libsmb/smb_share_modes.c b/source3/libsmb/smb_share_modes.c index 86e1a81ef1..a4a54972c9 100644 --- a/source3/libsmb/smb_share_modes.c +++ b/source3/libsmb/smb_share_modes.c @@ -131,8 +131,9 @@ int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx, uint64_t extid) { struct locking_key lk; - return tdb_chainunlock(db_ctx->smb_tdb, - get_locking_key(&lk, dev, ino, extid)); + tdb_chainunlock(db_ctx->smb_tdb, + get_locking_key(&lk, dev, ino, extid)); + return 0; } /* |