summaryrefslogtreecommitdiffstats
path: root/libc/stdlib/malloc-standard/calloc.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 04:03:33 +0000
commitcb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8 (patch)
tree520f8e8d113184cfa7954ebd274564b8c255fa9a /libc/stdlib/malloc-standard/calloc.c
parente4461be66e2655058aef358b00050bc70ac72861 (diff)
downloaduClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.bz2
uClibc-alpine-cb6a88484ce0b5ffba2fe98a40e2d51f4af92eb8.tar.xz
Merge from trunk. Going pretty good so far. Kind of. Okay, not really.
Diffstat (limited to 'libc/stdlib/malloc-standard/calloc.c')
-rw-r--r--libc/stdlib/malloc-standard/calloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/stdlib/malloc-standard/calloc.c b/libc/stdlib/malloc-standard/calloc.c
index b8c43d9dc..99e8884ad 100644
--- a/libc/stdlib/malloc-standard/calloc.c
+++ b/libc/stdlib/malloc-standard/calloc.c
@@ -16,6 +16,7 @@
#include "malloc.h"
+libc_hidden_proto(memset)
/* ------------------------------ calloc ------------------------------ */
void* calloc(size_t n_elements, size_t elem_size)
@@ -54,7 +55,7 @@ void* calloc(size_t n_elements, size_t elem_size)
assert(nclears >= 3);
if (nclears > 9)
- __memset(d, 0, clearsize);
+ memset(d, 0, clearsize);
else {
*(d+0) = 0;
@@ -83,7 +84,7 @@ void* calloc(size_t n_elements, size_t elem_size)
d = (size_t*)mem;
/* Note the additional (sizeof(size_t)) */
clearsize = chunksize(p) - 2*(sizeof(size_t));
- __memset(d, 0, clearsize);
+ memset(d, 0, clearsize);
}
#endif
}