From: Volker Lendecke Date: Mon, 27 May 2019 11:45:10 +0000 (+0200) Subject: smbd: Simplify an if-expression in smbd_do_locking() X-Git-Tag: ldb-2.0.5~596 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=115e9ea3af9eb248f25f2ac6505956226f8dc6cd;p=thirdparty%2Fsamba.git smbd: Simplify an if-expression in smbd_do_locking() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 2388fae1b3c..188bc4e900b 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -8176,8 +8176,8 @@ NTSTATUS smbd_do_locking(struct smb_request *req, if (br_lck && blocking_lock && ERROR_WAS_LOCK_DENIED(status)) { /* Windows internal resolution for blocking locks seems to be about 200ms... Don't wait for less than that. JRA. */ - if (timeout != -1 && timeout < lp_lock_spin_time()) { - timeout = lp_lock_spin_time(); + if (timeout != -1) { + timeout = MAX(timeout, lp_lock_spin_time()); } defer_lock = true; }