From: Volker Lendecke Date: Sat, 23 Nov 2024 14:58:32 +0000 (+0100) Subject: smbd: Simplify smbd_smb2_query_directory_send() X-Git-Tag: tdb-1.4.13~436 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae97ebd9bc5408f15a9a78fd467a210af38c2029;p=thirdparty%2Fsamba.git smbd: Simplify smbd_smb2_query_directory_send() We don't need to call strcmp() to find an empty string. Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke --- diff --git a/source3/smbd/smb2_query_directory.c b/source3/smbd/smb2_query_directory.c index 7e039c09605..9b1c7b0cbca 100644 --- a/source3/smbd/smb2_query_directory.c +++ b/source3/smbd/smb2_query_directory.c @@ -301,7 +301,7 @@ static struct tevent_req *smbd_smb2_query_directory_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } - if (strcmp(state->in_file_name, "") == 0) { + if (state->in_file_name[0] == '\0') { tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_INVALID); return tevent_req_post(req, ev); }