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
@@ -83,7 +83,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
|
||||
bool is_dir;
|
||||
struct stat st;
|
||||
|
||||
if (streq(de->d_name, ".") || streq(de->d_name, ".."))
|
||||
if (dot_or_dot_dot(de->d_name))
|
||||
continue;
|
||||
|
||||
if (de->d_type == DT_UNKNOWN ||
|
||||
|
||||
Reference in New Issue
Block a user