summaryrefslogtreecommitdiff
path: root/source4/include/smb_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/include/smb_macros.h')
-rw-r--r--source4/include/smb_macros.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h
index f5ac3ac96d..f1c62ab024 100644
--- a/source4/include/smb_macros.h
+++ b/source4/include/smb_macros.h
@@ -70,4 +70,8 @@
#define SAFE_FREE(x) do { if ((x) != NULL) {free(discard_const_p(void *, (x))); (x)=NULL;} } while(0)
#endif
+#define malloc_p(type) (type *)malloc(sizeof(type))
+#define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), count)
+#define realloc_p(p, type, count) (type *)realloc_array(p, sizeof(type), count)
+
#endif /* _SMB_MACROS_H */