From 476fe607ecbabc5beffafc8efb0778e3d9e1030a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 24 Jan 2010 00:38:51 +0100 Subject: [PATCH] add simple memory zeroing macros --- macro.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.39.5