]> git.sur5r.net Git - cc65/blob - libsrc/common/calloc.c
Replace strdup by an assembler implementation
[cc65] / libsrc / common / calloc.c
1 /*
2  * calloc.c
3  *
4  * Ullrich von Bassewitz, 06.06.1998
5  */
6
7
8
9 #include <stdlib.h>
10 #include <string.h>
11
12
13
14 void* calloc (size_t count, size_t size)
15 {
16     void* mem;
17     size *= count;
18     if (mem = malloc (size)) {
19         memset (mem, 0, size);
20     }
21     return mem;
22 }
23
24
25