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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/rm-rf.c b/src/basic/rm-rf.c
index 77fe88e42c..0bbafb4cd7 100644
--- a/src/basic/rm-rf.c
+++ b/src/basic/rm-rf.c
@@ -132,7 +132,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
r = btrfs_subvol_remove_fd(fd, de->d_name, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
if (r < 0) {
- if (r != -ENOTTY && r != -EINVAL) {
+ if (!IN_SET(r, -ENOTTY, -EINVAL)) {
if (ret == 0)
ret = r;
@@ -193,7 +193,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
if (r >= 0)
return r;
- if (r != -ENOTTY && r != -EINVAL && r != -ENOTDIR)
+ if (!IN_SET(r, -ENOTTY, -EINVAL, -ENOTDIR))
return r;
/* Not btrfs or not a subvolume */