]> mj.ucw.cz Git - libucw.git/blobdiff - lib/pool.c
sign mismatch fixed
[libucw.git] / lib / pool.c
index 6143c68af0b67c5f2f87301b08e90773e8b31000..4eea7bf700f8e0ab0981bd22c0f2b3933050f546 100644 (file)
@@ -8,6 +8,7 @@
 #include "lib/pools.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 struct memchunk {
   struct memchunk *next;
@@ -97,3 +98,11 @@ mp_alloc(struct mempool *p, uns s)
       return c->data;
     }
 }
+
+void *
+mp_alloc_zero(struct mempool *p, uns s)
+{
+  void *x = mp_alloc(p, s);
+  bzero(x, s);
+  return x;
+}