git://git.onelab.eu
/
bootcd.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
syslinux-3.08-2 sources from FC4
[bootcd.git]
/
syslinux
/
com32
/
lib
/
calloc.c
1
/*
2
* calloc.c
3
*/
4
5
#include <stdlib.h>
6
#include <string.h>
7
8
/* FIXME: This should look for multiplication overflow */
9
10
void *calloc(size_t nmemb, size_t size)
11
{
12
void *ptr;
13
14
size *= nmemb;
15
ptr = malloc(size);
16
if ( ptr )
17
memset(ptr, 0, size);
18
19
return ptr;
20
}
21