From 115e9ea3af9eb248f25f2ac6505956226f8dc6cd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 27 May 2019 13:45:10 +0200 Subject: [PATCH] smbd: Simplify an if-expression in smbd_do_locking() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/smbd/reply.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index 2388fae1b3c1..188bc4e900bc 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; } -- 2.34.1