conterm/libc/mallocz.c
Russ Cox 934846f35c a
2005-08-08 12:50:13 +00:00

14 lines
141 B
C

#include <u.h>
#include <libc.h>
void*
mallocz(ulong n, int clr)
{
void *v;
v = malloc(n);
if(v && clr)
memset(v, 0, n);
return v;
}