From d880116fae16a17c36550c7915068b65a45b88c4 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 2 Jun 2021 17:56:59 -0700 Subject: [PATCH] s3: smbd: rmdir_internals(). Coding cleanup. Always use ISDOT(dname) || ISDOTDOT(dname). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- source3/smbd/close.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 3a34f0263d5..e066d3a697c 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -1051,9 +1051,7 @@ static NTSTATUS rmdir_internals(TALLOC_CTX *ctx, struct files_struct *fsp) } while ((dname = ReadDirName(dir_hnd, &dirpos, &st, &talloced)) != NULL) { - if ((strcmp(dname, ".") == 0) || - (strcmp(dname, "..") == 0)) - { + if (ISDOT(dname) || ISDOTDOT(dname)) { TALLOC_FREE(talloced); continue; } -- 2.47.3