aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/mallocz.c
blob: c631300887cd2d5adf3062f6c7e7a979717a5926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#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;
}