From 5bc9299f0d1b0baf220b75da86520606e87c4b3a Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Sat, 15 Jun 2013 18:42:03 +0200 Subject: curve: simplify curve25519_proto_init and others Simplify the function curve25519_proto_init() and also have minor cleanups in other related ones. Signed-off-by: Daniel Borkmann --- xmalloc.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'xmalloc.h') diff --git a/xmalloc.h b/xmalloc.h index e1e4f8f..952b827 100644 --- a/xmalloc.h +++ b/xmalloc.h @@ -24,6 +24,12 @@ static inline void __xfree(void *ptr) free(ptr); } +#define xzfree(ptr, size) \ +do { \ + xmemset(ptr, 0, size); \ + xfree(ptr); \ +} while (0) + #define xfree(ptr) \ do { \ __xfree(ptr); \ -- cgit v1.2.3-54-g00ecf