1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

tdb_chainlock: 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>
This commit is contained in:
Rusty Russell
2011-06-20 18:40:31 +09:30
parent d6251996fa
commit 868d77bc5b
4 changed files with 5 additions and 5 deletions

View File

@ -122,7 +122,7 @@ int smb_lock_share_mode_entry(struct smbdb_ctx *db_ctx,
{
struct locking_key lk;
return tdb_chainlock(db_ctx->smb_tdb, get_locking_key(&lk, dev, ino,
extid));
extid)) == 0 ? 0 : -1;
}
int smb_unlock_share_mode_entry(struct smbdb_ctx *db_ctx,