chiark / gitweb /
fs-util: unify code we use to check if dirent's d_name is "." or ".."
[elogind.git] / src / basic / socket-util.c
index 6a8ca1d7e375168fce35c6eb1d9a29e28c84907f..9ec9012611c6346141bc276599548702042b6e0c 100644 (file)
@@ -881,7 +881,7 @@ bool ifname_valid(const char *p) {
         if (strlen(p) >= IFNAMSIZ)
                 return false;
 
-        if (STR_IN_SET(p, ".", ".."))
+        if (dot_or_dot_dot(p))
                 return false;
 
         while (*p) {