Adding upstream version 3.50~pre5.
[syslinux-debian/hramrach.git] / com32 / lib / calloc.c
blobebab49bfb4c7c8804e1b13c3162ef0dcce835b8e
1 /*
2 * calloc.c
3 */
5 #include <stdlib.h>
6 #include <string.h>
8 /* FIXME: This should look for multiplication overflow */
10 void *calloc(size_t nmemb, size_t size)
12 void *ptr;
14 size *= nmemb;
15 ptr = malloc(size);
16 if ( ptr )
17 memset(ptr, 0, size);
19 return ptr;