X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Falloc.c;h=075321436c44f1dba1ffb54d5098d5248fd60b64;hb=995458e48d482bd5fa349882fba5cb4d6350076d;hp=bec45d9b590f691050aa7722cc746af63c91c640;hpb=1571781022499a9d0c32d249f89945d034d1cbff;p=libucw.git diff --git a/lib/alloc.c b/lib/alloc.c index bec45d9b..07532143 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -7,6 +7,7 @@ #include "lib/lib.h" #include +#include void * xmalloc(uns size) @@ -16,3 +17,11 @@ xmalloc(uns size) die("Cannot allocate %d bytes of memory", size); return x; } + +void * +xmalloc_zero(uns size) +{ + void *x = xmalloc(size); + bzero(x, size); + return x; +}