From: Joseph Sutton Date: Thu, 5 Oct 2023 21:07:14 +0000 (+1300) Subject: s4:ntvfs: Remove unneeded NULL check (CID 240771) X-Git-Tag: tevent-0.16.0~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bb18ece5bfdc8bf88bf8358c5e94a9d866e18cc;p=thirdparty%2Fsamba.git s4:ntvfs: Remove unneeded NULL check (CID 240771) We’ve already dereferenced ‘pending’ in the init‐clause of the loop, and won’t reassign it during the loop. 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 54c7a33d3a0..c113232248e 100644 --- a/source4/ntvfs/posix/pvfs_lock.c +++ b/source4/ntvfs/posix/pvfs_lock.c @@ -173,9 +173,7 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice /* we've now got the pending lock. try and get the rest, which might lead to more pending locks */ for (i=pending->pending_lock+1;ilockx.in.lock_cnt;i++) { - if (pending) { - pending->pending_lock = i; - } + pending->pending_lock = i; status = brlock_lock(pvfs->brl_context, f->brl_handle,