gbdk-releases/gbdk-lib/libc/calloc.c
2015-01-10 16:25:07 +01:00

16 lines
250 B
C

#include <sys/malloc.h>
#include <string.h>
#include <stdlib.h>
void *calloc( int nmem, int size )
{
void *malloced;
malloced = malloc( nmem*size );
if (malloced!=NULL) {
memset( malloced, 0, nmem*size );
return malloced;
}
return NULL;
}