plan9port/src/lib9/mallocz.c

15 lines
174 B
C
Raw Normal View History

2003-09-30 17:47:41 +00:00
#include <unistd.h>
#include <string.h>
#include <lib9.h>
void*
mallocz(unsigned long n, int clr)
{
void *v;
v = malloc(n);
if(clr && v)
memset(v, 0, n);
return v;
}