summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 27b21f97cc..04c9fcd71e 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -519,12 +519,17 @@ void warn_melody(void);
int get_shell(char **ret);
int get_home_dir(char **ret);
-void freep(void *p);
+static inline void freep(void *p) {
+ free(*(void**) p);
+}
+
void fclosep(FILE **f);
void pclosep(FILE **f);
void closep(int *fd);
void closedirp(DIR **d);
-void umaskp(mode_t *u);
+static inline void umaskp(mode_t *u) {
+ umask(*u);
+}
_malloc_ static inline void *malloc_multiply(size_t a, size_t b) {
if (_unlikely_(b == 0 || a > ((size_t) -1) / b))