From: Volker Lendecke Date: Tue, 6 Dec 2022 09:54:48 +0000 (+0100) Subject: smbd: Simplify dos_mode_msdfs() X-Git-Tag: talloc-2.4.0~355 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9c982b5a96bed750bdff0a5243dda73c3d17587;p=thirdparty%2Fsamba.git smbd: Simplify dos_mode_msdfs() Use ISDOT[DOT] Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 2e3aa0934a7..4168eb209c7 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -554,8 +554,7 @@ uint32_t dos_mode_msdfs(connection_struct *conn, } /* Only . and .. are not hidden. */ - if (p[0] == '.' && !((p[1] == '\0') || - (p[1] == '.' && p[2] == '\0'))) { + if ((p[0] == '.') && !(ISDOT(p) || ISDOTDOT(p))) { result |= FILE_ATTRIBUTE_HIDDEN; } }