summaryrefslogtreecommitdiff
path: root/macro.h
diff options
context:
space:
mode:
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/macro.h b/macro.h
index ed09750f73..0223a40b6e 100644
--- 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