mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
lib/dbwrap: clang: Fix 'all argument is an uninitialized value'
Fixes: lib/dbwrap/dbwrap.c:533:4: warning: 2nd function call argument is an uninitialized value <--[clang] dbwrap_lock_order_unlock(db, lockptr); ^ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
1d00bd9f0b
commit
37add5c8ce
@ -520,7 +520,7 @@ NTSTATUS dbwrap_do_locked(struct db_context *db, TDB_DATA key,
|
||||
struct db_record *rec;
|
||||
|
||||
if (db->do_locked != NULL) {
|
||||
struct db_context **lockptr;
|
||||
struct db_context **lockptr = NULL;
|
||||
NTSTATUS status;
|
||||
|
||||
if (db->lock_order != DBWRAP_LOCK_ORDER_NONE) {
|
||||
@ -529,7 +529,8 @@ NTSTATUS dbwrap_do_locked(struct db_context *db, TDB_DATA key,
|
||||
|
||||
status = db->do_locked(db, key, fn, private_data);
|
||||
|
||||
if (db->lock_order != DBWRAP_LOCK_ORDER_NONE) {
|
||||
if (db->lock_order != DBWRAP_LOCK_ORDER_NONE &&
|
||||
lockptr != NULL) {
|
||||
dbwrap_lock_order_unlock(db, lockptr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user