X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Falloc.c;h=075321436c44f1dba1ffb54d5098d5248fd60b64;hb=b53b0576a2325cd6b81625a3b9ad3f91f0b7a249;hp=c72851eec33c7cf4eebdb27e9ff6c9421aabff5b;hpb=0e7d50eaa3d75b0093d44e7e632315ec70ceddcf;p=libucw.git diff --git a/lib/alloc.c b/lib/alloc.c index c72851ee..07532143 100644 --- a/lib/alloc.c +++ b/lib/alloc.c @@ -1,13 +1,13 @@ /* * Sherlock Library -- Memory Allocation * - * (c) 1997 Martin Mares, + * (c) 2000 Martin Mares */ -#include -#include +#include "lib/lib.h" -#include "lib.h" +#include +#include void * xmalloc(uns size) @@ -17,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; +}