summaryrefslogtreecommitdiffstats
path: root/src/basic/rm-rf.c
diff options
context:
space:
mode:
authorAndreas Rammhold <andreas@rammhold.de>2017-09-29 09:58:22 +0200
committerAndreas Rammhold <andreas@rammhold.de>2017-10-02 13:09:56 +0200
commitec2ce0c5d7623c83dabf50c98253f5b0c0fb1359 (patch)
tree2be64c5b07a1c2cde8c2244a78b5e4c5e125e4b9 /src/basic/rm-rf.c
parenttree-wide: use IN_SET where possible (diff)
downloadsystemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.tar.xz
systemd-ec2ce0c5d7623c83dabf50c98253f5b0c0fb1359.zip
tree-wide: use `!IN_SET(..)` for `a != b && a != c && …`
The included cocci was used to generate the changes. Thanks to @flo-wer for pointing this case out.
Diffstat (limited to 'src/basic/rm-rf.c')
-rw-r--r--src/basic/rm-rf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
index 3f80ed263a..77fe88e42c 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -202,7 +202,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
fd = open(path, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC|O_NOFOLLOW|O_NOATIME);
if (fd < 0) {
- if (errno != ENOTDIR && errno != ELOOP)
+ if (!IN_SET(errno, ENOTDIR, ELOOP))
return -errno;
if (!(flags & REMOVE_PHYSICAL)) {