shithub: tlsclient

ref: c7d2daff128ed89c4a64ad6d235f15764e73e5f9
dir: /libc/mallocz.c/

View raw version
#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;
}