summaryrefslogtreecommitdiff
path: root/src/basic/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/util.h')
-rw-r--r--src/basic/util.h19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/basic/util.h b/src/basic/util.h
index 680317909d..e356f59cd5 100644
--- a/src/basic/util.h
+++ b/src/basic/util.h
@@ -152,12 +152,7 @@ static inline void freep(void *p) {
free(*(void**) p);
}
-static inline void umaskp(mode_t *u) {
- umask(*u);
-}
-
#define _cleanup_free_ _cleanup_(freep)
-#define _cleanup_umask_ _cleanup_(umaskp)
#define _cleanup_globfree_ _cleanup_(globfree)
_malloc_ _alloc_(1, 2) static inline void *malloc_multiply(size_t a, size_t b) {
@@ -222,20 +217,6 @@ static inline int negative_errno(void) {
return -errno;
}
-struct _umask_struct_ {
- mode_t mask;
- bool quit;
-};
-
-static inline void _reset_umask_(struct _umask_struct_ *s) {
- umask(s->mask);
-};
-
-#define RUN_WITH_UMASK(mask) \
- for (_cleanup_(_reset_umask_) struct _umask_struct_ _saved_umask_ = { umask(mask), false }; \
- !_saved_umask_.quit ; \
- _saved_umask_.quit = true)
-
static inline unsigned u64log2(uint64_t n) {
#if __SIZEOF_LONG_LONG__ == 8
return (n > 1) ? (unsigned) __builtin_clzll(n) ^ 63U : 0;