summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-02-05 14:48:24 -0800
committerPixel <pixel@nobis-crew.org>2011-02-05 14:48:24 -0800
commitdf0cc5d42c6b6ce77b28b19415a2d25e41fb0b97 (patch)
tree14bfc476ae305467a1990be3f19679ac7434ff19 /libc
parentd257cf29744f732c4d9b1a741a26164940e87b90 (diff)
Adding library acorn, with malloc wrapping.
Diffstat (limited to 'libc')
-rw-r--r--libc/include/malloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/include/malloc.h b/libc/include/malloc.h
index 715c90b..58e0481 100644
--- a/libc/include/malloc.h
+++ b/libc/include/malloc.h
@@ -20,7 +20,7 @@ extern realloc_t realloc;
static inline void * calloc(size_t nmemb, size_t size) {
uint8_t * r = malloc(nmemb * size);
size_t i;
- for (i = 0; i < size; i++)
+ for (i = 0; i < (size * nmemb); i++)
r[i] = 0;
return r;
}