From: Lennart Poettering Date: Sat, 23 Jan 2010 23:38:51 +0000 (+0100) Subject: add simple memory zeroing macros X-Git-Tag: 0.git+20100605+dfd8ee-1~426 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=476fe607ecbabc5beffafc8efb0778e3d9e1030a;p=systemd add simple memory zeroing macros --- diff --git a/macro.h b/macro.h index 267da83a..ed09750f 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