fs-util: unify code we use to check if dirent's d_name is "." or ".."
We use different idioms at different places. Let's replace this is the one true new idiom, that is even a bit faster...
This commit is contained in:
@@ -877,7 +877,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) {
|
||||
|
||||
Reference in New Issue
Block a user