]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: rmdir_internals(). Coding cleanup. Always use ISDOT(dname) || ISDOTDOT...
authorJeremy Allison <jra@samba.org>
Thu, 3 Jun 2021 00:56:59 +0000 (17:56 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/close.c

index 3a34f0263d5c65aeb32b5a14b1379bd34366097f..e066d3a697c4bb2725e7e68285fa574c9c023582 100644 (file)
@@ -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;
                }