]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: realigning a complex if expression in unix_convert()
authorRalph Boehme <slow@samba.org>
Tue, 5 May 2020 09:13:47 +0000 (11:13 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 5 May 2020 19:18:42 +0000 (19:18 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/filename.c

index 913f192ab2fa61a426a7dbdc6020a2eb92fa3de2..7f11239c77d55f3d68e18f97bb51b80f2ad3a2aa 100644 (file)
@@ -1121,11 +1121,20 @@ NTSTATUS unix_convert(TALLOC_CTX *mem_ctx,
         * added and verified in build_stream_path().
         */
 
-       if((!state->conn->case_sensitive || !(state->conn->fs_capabilities &
-                                      FILE_CASE_SENSITIVE_SEARCH)) &&
-           stat_cache_lookup(state->conn, state->posix_pathnames, &state->smb_fname->base_name, &state->dirpath, &state->name,
-                             &state->smb_fname->st)) {
-               goto done;
+       if (!state->conn->case_sensitive ||
+           !(state->conn->fs_capabilities & FILE_CASE_SENSITIVE_SEARCH))
+       {
+               bool found;
+
+               found = stat_cache_lookup(state->conn,
+                                         state->posix_pathnames,
+                                         &state->smb_fname->base_name,
+                                         &state->dirpath,
+                                         &state->name,
+                                         &state->smb_fname->st);
+               if (found) {
+                       goto done;
+               }
        }
 
        /*