chiark / gitweb /
nspawn: create empty /etc/resolv.conf if necessary
[elogind.git] / src / shared / util.c
index 2a8046922bf539824f1a1f38d449d3d76c2f747a..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,9 +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
-                CMP_F_TYPE(s->f_type, TMPFS_MAGIC) ||
-                CMP_F_TYPE(s->f_type, 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) {
@@ -4344,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);