Sign in
mojo
/
mojo-tools
/
ce913b53e2545ddd4d4a565997d0816e8ef90a22
/
.
/
fusl
/
src
/
malloc
/
calloc.c
blob: fc4c762c149a2e06dbb54d2e8fbc65ab7f491715 [
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
);
}