summaryrefslogtreecommitdiff
path: root/src/shared/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-14 10:06:42 +0200
committerLennart Poettering <lennart@poettering.net>2012-09-14 10:06:42 +0200
commite67f47e55b850c2a3a52c550726b1fd7394f9276 (patch)
tree86b94a315a768a20573828d958de9ca9c217b9a4 /src/shared/macro.h
parent71dc3ed1d95dfe246004018c2ca85156fc73c146 (diff)
util: modernize a few functions with automatic cleanup variables
Just trying to get the feel for it. And it's pretty cool.
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r--src/shared/macro.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h
index df17617b1e..eb9a8c0a72 100644
--- a/src/shared/macro.h
+++ b/src/shared/macro.h
@@ -189,5 +189,6 @@ static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
#define _cleanup_free_ __attribute__((cleanup(freep)))
#define _cleanup_fclose_ __attribute__((cleanup(fclosep)))
+#define _cleanup_close_ __attribute__((cleanup(closep)))
#include "log.h"