X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Futil.c;h=5d03272619a0831dea4acb2c4a302dc3bdca69a3;hb=4826f0b7b5c0aefa08b8cc7ef64d69027f84da2c;hp=a55b27f878a32214651f528934ca06afaceed6ab;hpb=49aa47c7fb6c6cf85f2780080e89181974efdc3b;p=elogind.git diff --git a/src/shared/util.c b/src/shared/util.c index a55b27f87..5d0327261 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -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);