chiark / gitweb /
shared: call va_end in all cases
[elogind.git] / src / shared / macro.h
index 97eebbc88be174349e31b24e36bd1db4533d2f7e..c7ce7c87d096079fdc1ff0f6c3a60582a2407197 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foomacrohfoo
-#define foomacrohfoo
+#pragma once
 
 /***
   This file is part of systemd.
@@ -188,6 +187,10 @@ static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) {
         return k;
 }
 
-#include "log.h"
+#define _cleanup_free_ __attribute__((cleanup(freep)))
+#define _cleanup_fclose_ __attribute__((cleanup(fclosep)))
+#define _cleanup_close_ __attribute__((cleanup(closep)))
+#define _cleanup_closedir_ __attribute__((cleanup(closedirp)))
+#define _cleanup_umask_ __attribute__((cleanup(umaskp)))
 
-#endif
+#include "log.h"