]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Slightly simplify smbd_smb2_lock_send()
authorVolker Lendecke <vl@samba.org>
Mon, 1 Sep 2025 15:16:42 +0000 (17:16 +0200)
committerAnoop C S <anoopcs@samba.org>
Sun, 15 Feb 2026 10:42:33 +0000 (10:42 +0000)
"<bool> == false" just looks wrong :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/smb2_lock.c

index 0a13832307716b2a648d3f8f5247c444c40b2989..08490845a4b2cee610b010e1c732d78def8d5525 100644 (file)
@@ -448,7 +448,7 @@ static struct tevent_req *smbd_smb2_lock_send(TALLOC_CTX *mem_ctx,
                }
 
                if (in_locks[i].flags & SMB2_LOCK_FLAG_EXCLUSIVE) {
-                       if (posix_handle && fsp->fsp_flags.can_write == false) {
+                       if (posix_handle && !fsp->fsp_flags.can_write) {
                                /*
                                 * Can't get a write lock on a posix
                                 * read-only handle.