From: Volker Lendecke Date: Mon, 27 Nov 2023 09:51:45 +0000 (+0100) Subject: smbd: Slightly simplify smbd_smb2_query_directory_send() X-Git-Tag: talloc-2.4.2~266 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a22aeed277f84dfefaef6e8157843991bdda60dc;p=thirdparty%2Fsamba.git smbd: Slightly simplify smbd_smb2_query_directory_send() Avoid an if-statement when just assigning the result of the if-condition to a boolean. Signed-off-by: Volker Lendecke Reviewed-by: Guenther Deschner --- diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 5f1a52c194c..ebbbbb39911 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -471,10 +471,11 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, "in_output_buffer_length = %u\n", fsp->fsp_name->base_name, lp_dont_descend(talloc_tos(), lp_sub, SNUM(conn)), (unsigned int)in_output_buffer_length )); - if (in_list(fsp->fsp_name->base_name,lp_dont_descend(talloc_tos(), lp_sub, SNUM(conn)), - posix_dir_handle ? true : conn->case_sensitive)) { - state->dont_descend = true; - } + + state->dont_descend = in_list( + fsp->fsp_name->base_name, + lp_dont_descend(talloc_tos(), lp_sub, SNUM(conn)), + posix_dir_handle ? true : conn->case_sensitive); /* * SMB_FIND_FILE_NAMES_INFO doesn't need stat information