smbd: Use ISDOT/ISDOTDOT instead of strcmp
authorVolker Lendecke <vl@samba.org>
Tue, 29 Sep 2020 11:04:28 +0000 (13:04 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 2 Oct 2020 21:30:33 +0000 (21:30 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/dir.c

index 6a2538549e4b78a253b7373d7041c6568ffdad91..0001726e582660108cfd6f395877d1d59fc5e6bc 100644 (file)
@@ -1235,7 +1235,7 @@ bool is_visible_file(connection_struct *conn,
        struct smb_filename *smb_fname_base = NULL;
        bool ret = false;
 
-       if ((strcmp(".",name) == 0) || (strcmp("..",name) == 0)) {
+       if (ISDOT(name) || ISDOTDOT(name)) {
                return True; /* . and .. are always visible. */
        }