summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-17 23:20:00 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-18 19:06:48 -0500
commita2341f6836da0a217ab0c5f2b82f0c4ea13d429d (patch)
tree480f8f6be4741650856e3df45cfac037eaf40828 /src/shared/util.h
parent2695c5c44e028d1bc07404baf3357e5a6017fc57 (diff)
Move DEFINE_TRIVIAL_CLEANUP_FUNC to macro.h
This remove the need for various header files to include the (relatively heavyweight) util.h.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index 5818fee82e..8a3e95a17a 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -664,13 +664,6 @@ static inline void freep(void *p) {
free(*(void**) p);
}
-#define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
- static inline void func##p(type *p) { \
- if (*p) \
- func(*p); \
- } \
- struct __useless_struct_to_allow_trailing_semicolon__
-
static inline void closep(int *fd) {
safe_close(*fd);
}