From 6e8ffcff46a95aa50937d8d9ea5d21c5d46e0e4a Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 5 May 2020 11:13:47 +0200 Subject: [PATCH] smbd: realigning a complex if expression in unix_convert() Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/filename.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) 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; + } } /*