From: Jeremy Allison Date: Thu, 3 Jun 2021 00:56:59 +0000 (-0700) Subject: s3: smbd: rmdir_internals(). Coding cleanup. Always use ISDOT(dname) || ISDOTDOT... X-Git-Tag: tevent-0.11.0~634 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d880116fae16a17c36550c7915068b65a45b88c4;p=thirdparty%2Fsamba.git s3: smbd: rmdir_internals(). Coding cleanup. Always use ISDOT(dname) || ISDOTDOT(dname). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- 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; }