chiark / gitweb /
Revert f_type fixups
[elogind.git] / src / shared / util.c
index a55b27f878a32214651f528934ca06afaceed6ab..5d03272619a0831dea4acb2c4a302dc3bdca69a3 100644 (file)
@@ -2080,7 +2080,7 @@ int release_terminal(void) {
                 .sa_handler = SIG_IGN,
                 .sa_flags = SA_RESTART,
         };
-        int _cleanup_close_ fd;
+        _cleanup_close_ int fd;
 
         fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_NDELAY|O_CLOEXEC);
         if (fd < 0)
@@ -2779,8 +2779,8 @@ 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 s->f_type == TMPFS_MAGIC ||
-                (long)s->f_type == (long)RAMFS_MAGIC;
+        return s->f_type == (__SWORD_TYPE) TMPFS_MAGIC ||
+                s->f_type == (__SWORD_TYPE) RAMFS_MAGIC;
 }
 
 int rm_rf_children(int fd, bool only_dirs, bool honour_sticky, struct stat *root_dev) {
@@ -4343,7 +4343,7 @@ int in_group(const char *name) {
 }
 
 int glob_exists(const char *path) {
-        glob_t _cleanup_globfree_ g = {};
+        _cleanup_globfree_ glob_t g = {};
         int r, k;
 
         assert(path);