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:
+1
-1
@@ -331,7 +331,7 @@ static int fd_copy_directory(
|
||||
struct stat buf;
|
||||
int q;
|
||||
|
||||
if (STR_IN_SET(de->d_name, ".", ".."))
|
||||
if (dot_or_dot_dot(de->d_name))
|
||||
continue;
|
||||
|
||||
if (fstatat(dirfd(d), de->d_name, &buf, AT_SYMLINK_NOFOLLOW) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user