From: Joseph Sutton Date: Thu, 5 Oct 2023 21:10:16 +0000 (+1300) Subject: s4:ntvfs: Remove dead code path X-Git-Tag: tevent-0.16.0~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bea908cf604b60a3501527a7fdb9ed221f451556;p=thirdparty%2Fsamba.git s4:ntvfs: Remove dead code path ‘pending’ will never be NULL. View with ‘git show -b’. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/ntvfs/posix/pvfs_lock.c b/source4/ntvfs/posix/pvfs_lock.c index c113232248e..0802dedc676 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -182,24 +182,19 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice locks[i].count, rw, pending); if (!NT_STATUS_IS_OK(status)) { - if (pending) { - /* a timed lock failed - setup a wait message to handle - the pending lock notification or a timeout */ - pending->wait_handle = pvfs_wait_message(pvfs, req, MSG_BRL_RETRY, - pending->end_time, - pvfs_pending_lock_continue, - pending); - if (pending->wait_handle == NULL) { - pvfs_lock_async_failed(pvfs, req, f, locks, i, NT_STATUS_NO_MEMORY); - talloc_free(pending); - } else { - talloc_steal(pending, pending->wait_handle); - DLIST_ADD(f->pending_list, pending); - } - return; + /* a timed lock failed - setup a wait message to handle + the pending lock notification or a timeout */ + pending->wait_handle = pvfs_wait_message(pvfs, req, MSG_BRL_RETRY, + pending->end_time, + pvfs_pending_lock_continue, + pending); + if (pending->wait_handle == NULL) { + pvfs_lock_async_failed(pvfs, req, f, locks, i, NT_STATUS_NO_MEMORY); + talloc_free(pending); + } else { + talloc_steal(pending, pending->wait_handle); + DLIST_ADD(f->pending_list, pending); } - pvfs_lock_async_failed(pvfs, req, f, locks, i, status); - talloc_free(pending); return; }