chiark / gitweb /
add basic (and not very useful) D-Bus support
[elogind.git] / macro.h
diff --git a/macro.h b/macro.h
index ed09750f73a9bd359bb1890bc26627e7abf23b6e..0223a40b6e71824e928ece08151c5a5636e5ce53 100644 (file)
--- a/macro.h
+++ b/macro.h
@@ -76,4 +76,6 @@ static inline size_t ALIGN(size_t l) {
 #define memzero(x,l) (memset((x), 0, (l)))
 #define zero(x) (memzero(&(x), sizeof(x)))
 
+#define char_array_0(x) x[sizeof(x)-1] = 0;
+
 #endif