summaryrefslogtreecommitdiff
path: root/src/basic/copy.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-02-02 00:06:18 +0100
committerLennart Poettering <lennart@poettering.net>2017-02-02 00:06:18 +0100
commit49bfc8774bf900fb2239a9b70b951aedccbfed5a (patch)
treea9568c2f49824df4b6add75f0a1882103a8c3ffa /src/basic/copy.c
parent1d0106996c2f80cdd0510206b9fd2d81d3fcd0cc (diff)
downloadsystemd-49bfc8774bf900fb2239a9b70b951aedccbfed5a.tar.gz
systemd-49bfc8774bf900fb2239a9b70b951aedccbfed5a.tar.bz2
systemd-49bfc8774bf900fb2239a9b70b951aedccbfed5a.zip
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/copy.c')
-rw-r--r--src/basic/copy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/copy.c b/src/basic/copy.c
index 9883f5fa31..e9a7efd232 100644
--- a/src/basic/copy.c
+++ b/src/basic/copy.c
@@ -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) {