]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Reduce indentation, remove a nested if-statement
authorVolker Lendecke <vl@samba.org>
Thu, 31 Aug 2023 09:33:02 +0000 (11:33 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 10 Oct 2023 23:23:40 +0000 (23:23 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/open.c

index 81d275a53dc65309fa675801c4e49db876e78142..258a41f2c854a54db3dd2d00d581addfae64016c 100644 (file)
@@ -6040,11 +6040,10 @@ static NTSTATUS create_file_unixpath(connection_struct *conn,
         * delete access.
         * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358
         */
-       if (create_options & FILE_DELETE_ON_CLOSE) {
-               if ((access_mask & DELETE_ACCESS) == 0) {
-                       status = NT_STATUS_INVALID_PARAMETER;
-                       goto fail;
-               }
+       if ((create_options & FILE_DELETE_ON_CLOSE) &&
+           ((access_mask & DELETE_ACCESS) == 0)) {
+               status = NT_STATUS_INVALID_PARAMETER;
+               goto fail;
        }
 
        if ((conn->fs_capabilities & FILE_NAMED_STREAMS)