From: Ralph Boehme Date: Tue, 5 May 2020 09:13:47 +0000 (+0200) Subject: smbd: realigning a complex if expression in unix_convert() X-Git-Tag: ldb-2.2.0~662 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6e8ffcff46a95aa50937d8d9ea5d21c5d46e0e4a;p=thirdparty%2Fsamba.git smbd: realigning a complex if expression in unix_convert() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 913f192ab2f..7f11239c77d 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -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; + } } /*