mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-15 11:20:03 +00:00
15 lines
174 B
C
15 lines
174 B
C
|
#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;
|
||
|
}
|