diff th_util.c @ 68:29f9651465c6

Added a new memory allocator function, th_malloc0(size), which is the same as calloc(1, size).
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 15 Nov 2012 19:22:06 +0200
parents 34d58b0f2d52
children 029b3dea31ff
line wrap: on
line diff
--- a/th_util.c	Thu Nov 15 19:21:14 2012 +0200
+++ b/th_util.c	Thu Nov 15 19:22:06 2012 +0200
@@ -130,6 +130,12 @@
 }
 
 
+void *th_malloc0(size_t l)
+{
+    return calloc(1, l);
+}
+
+
 void *th_calloc(size_t n, size_t l)
 {
     return calloc(n, l);