diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:06:18 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-02 00:06:18 +0100 |
commit | 49bfc8774bf900fb2239a9b70b951aedccbfed5a (patch) | |
tree | a9568c2f49824df4b6add75f0a1882103a8c3ffa /src/basic/rm-rf.c | |
parent | 1d0106996c2f80cdd0510206b9fd2d81d3fcd0cc (diff) | |
download | systemd-49bfc8774bf900fb2239a9b70b951aedccbfed5a.tar.gz |
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...
Diffstat (limited to 'src/basic/rm-rf.c')
-rw-r--r-- | src/basic/rm-rf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c index 07d42f78dd..08497af729 100644 --- a/src/basic/rm-rf.c +++ b/src/basic/rm-rf.c @@ -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 || |