Sign in
mojo
/
mojo
/
28dd561326b6d885e105e6bfa34f9b2770ce3910
/
.
/
fusl
/
src
/
malloc
/
calloc.c
blob: 436c0b034869a409cdc24d63adbd9be04ac5ff7e [
file
] [
log
] [
blame
]
#include
<stdlib.h>
#include
<errno.h>
void
*
__malloc0
(
size_t
);
void
*
calloc
(
size_t
m
,
size_t
n
)
{
if
(
n
&&
m
>
(
size_t
)-
1
/
n
)
{
errno
=
ENOMEM
;
return
0
;
}
return
__malloc0
(
n
*
m
);
}