shithub: drawterm

ref: 0f3766f44e554d73c7a3d8bab55cc32dc13f1c26

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;
}