summaryrefslogtreecommitdiff
path: root/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-24 00:38:51 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-24 00:38:51 +0100
commit476fe607ecbabc5beffafc8efb0778e3d9e1030a (patch)
tree549c82a2f3bd44d69e5d1d3a00b8ff9cb83bffa8 /macro.h
parent83c60c9f0c7581b607dc5c0f84582978894e3d4a (diff)
add simple memory zeroing macros
Diffstat (limited to 'macro.h')
-rw-r--r--macro.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/macro.h b/macro.h
index 267da83a0f..ed09750f73 100644
--- a/macro.h
+++ b/macro.h
@@ -73,4 +73,7 @@ static inline size_t ALIGN(size_t l) {
#define TO_INT32(p) ((int32_t) ((intptr_t) (p)))
#define INT32_TO_PTR(u) ((void*) ((intptr_t) (u)))
+#define memzero(x,l) (memset((x), 0, (l)))
+#define zero(x) (memzero(&(x), sizeof(x)))
+
#endif