diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-01-24 00:38:51 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-01-24 00:38:51 +0100 |
commit | 476fe607ecbabc5beffafc8efb0778e3d9e1030a (patch) | |
tree | 549c82a2f3bd44d69e5d1d3a00b8ff9cb83bffa8 | |
parent | 83c60c9f0c7581b607dc5c0f84582978894e3d4a (diff) |
add simple memory zeroing macros
-rw-r--r-- | macro.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |