chiark / gitweb /
Add macro for checking if some flags are set
[elogind.git] / src / basic / rm-rf.c
index 4ebc5c60a35936d5af4392b6c8b131e8fd6c748c..9143f0066a0d79f4ff7e367a3bbead141315134c 100644 (file)
@@ -181,7 +181,7 @@ int rm_rf(const char *path, RemoveFlags flags) {
         }
 
 #if 0 /// elogind does not support BTRFS this directly
-        if ((flags & (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) == (REMOVE_SUBVOLUME|REMOVE_ROOT|REMOVE_PHYSICAL)) {
+        if (FLAGS_SET(flags, REMOVE_SUBVOLUME | REMOVE_ROOT | REMOVE_PHYSICAL)) {
                 /* Try to remove as subvolume first */
                 r = btrfs_subvol_remove(path, BTRFS_REMOVE_RECURSIVE|BTRFS_REMOVE_QUOTA);
                 if (r >= 0)