Sign in
plan9port
/
plan9
/
1d2c3c3945a229f896640b615b84f3d9a78e8b5a
/
.
/
src
/
lib9
/
mallocz.c
blob: a3e91510b17797b6b4287f44a601d1fc43c6806d [
file
] [
log
] [
blame
]
#include
<u.h>
#include
<unistd.h>
#include
<string.h>
#include
<libc.h>
void
*
mallocz
(
unsigned
long
n
,
int
clr
)
{
void
*
v
;
v
=
malloc
(
n
);
if
(
clr
&&
v
)
memset
(
v
,
0
,
n
);
return
v
;
}