From f8a8579e84bf5cb33d2c331efd74ffeaf8072539 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 30 Apr 2019 09:28:10 +0200 Subject: tmpfile-util: simplify umask reset declaration --- src/basic/tmpfile-util.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/basic/tmpfile-util.c') diff --git a/src/basic/tmpfile-util.c b/src/basic/tmpfile-util.c index e77af7659f..5100d6a5ff 100644 --- a/src/basic/tmpfile-util.c +++ b/src/basic/tmpfile-util.c @@ -58,13 +58,11 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) { /* This is much like mkostemp() but is subject to umask(). */ int mkostemp_safe(char *pattern) { - _cleanup_umask_ mode_t u = 0; + _unused_ _cleanup_umask_ mode_t u = umask(0077); int fd; assert(pattern); - u = umask(077); - fd = mkostemp(pattern, O_CLOEXEC); if (fd < 0) return -errno; -- cgit v1.2.3