]> git.ipfire.org Git - thirdparty/git.git/blobdiff - hashmap.c
reftable: utility functions
[thirdparty/git.git] / hashmap.c
index 5009471800e8c61b50bfd670a7714daaa26a01c7..134d2eec804c2eb4851689901f47c251f73b01de 100644 (file)
--- a/hashmap.c
+++ b/hashmap.c
@@ -76,7 +76,7 @@ unsigned int memihash_cont(unsigned int hash_seed, const void *buf, size_t len)
 static void alloc_table(struct hashmap *map, unsigned int size)
 {
        map->tablesize = size;
-       map->table = xcalloc(size, sizeof(struct hashmap_entry *));
+       CALLOC_ARRAY(map->table, size);
 
        /* calculate resize thresholds for new size */
        map->grow_at = (unsigned int) ((uint64_t) size * HASHMAP_LOAD_FACTOR / 100);