diff options
Diffstat (limited to 'reftable/publicbasics.c')
| -rw-r--r-- | reftable/publicbasics.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/reftable/publicbasics.c b/reftable/publicbasics.c index 0ad7d5c0ff..44b84a125e 100644 --- a/reftable/publicbasics.c +++ b/reftable/publicbasics.c @@ -6,10 +6,10 @@ license that can be found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd */ +#include "system.h" #include "reftable-malloc.h" #include "basics.h" -#include "system.h" static void *(*reftable_malloc_ptr)(size_t sz); static void *(*reftable_realloc_ptr)(void *, size_t); @@ -37,8 +37,9 @@ void reftable_free(void *p) free(p); } -void *reftable_calloc(size_t sz) +void *reftable_calloc(size_t nelem, size_t elsize) { + size_t sz = st_mult(nelem, elsize); void *p = reftable_malloc(sz); memset(p, 0, sz); return p; |
