Sign in
plan9port
/
plan9
/
9bcf13737602ccefa95214df5ca2e118f332ebd0
/
.
/
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
;
}