chiark / gitweb /
Add ugly CMP_F_TYPE() macro
[elogind.git] / src / shared / util.c
index 386973b3fcc75ce70620d65dcfb2dec951dd297e..2a8046922bf539824f1a1f38d449d3d76c2f747a 100644 (file)
@@ -2779,8 +2779,9 @@ int rm_rf_children_dangerous(int fd, bool only_dirs, bool honour_sticky, struct
 
 static int is_temporary_fs(struct statfs *s) {
         assert(s);
-        return (unsigned __SWORD_TYPE) s->f_type == TMPFS_MAGIC ||
-                (unsigned __SWORD_TYPE) s->f_type == RAMFS_MAGIC;
+        return
+                CMP_F_TYPE(s->f_type, TMPFS_MAGIC) ||
+                CMP_F_TYPE(s->f_type, RAMFS_MAGIC);
 }
 
 int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) {