File: mallocz.c

package info (click to toggle)
drawterm 20240821-0.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,176 kB
  • sloc: ansic: 57,363; python: 2,501; makefile: 578; asm: 20
file content (13 lines) | stat: -rw-r--r-- 141 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
#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;
}