From 2f9e170f45e128eb6ab6bd97c9c8b40dcd9a97fa Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 4 Dec 2004 09:30:38 +0000 Subject: r4058: added a type safe version of smb_xmalloc() (This used to be commit 1235afa5fe3a396cd7a180cbc500834a30fbaa80) --- source4/include/includes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/include') diff --git a/source4/include/includes.h b/source4/include/includes.h index 6335780b89..ad24ff676d 100644 --- a/source4/include/includes.h +++ b/source4/include/includes.h @@ -321,3 +321,8 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3); #endif /* _INCLUDES_H */ +/* + type safe varient of smb_xmalloc() +*/ +#define smb_xmalloc_p(type) (type *)smb_xmalloc(sizeof(type)) + -- cgit