summaryrefslogtreecommitdiff
path: root/src/basic/rm-rf.c
diff options
context:
space:
mode:
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 156366c7d..fea9242be 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -206,7 +206,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)) {