aboutsummaryrefslogtreecommitdiff
path: root/analyzer
diff options
context:
space:
mode:
Diffstat (limited to 'analyzer')
-rw-r--r--analyzer/utils/structures/hashmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/analyzer/utils/structures/hashmap.c b/analyzer/utils/structures/hashmap.c
index 466f258..bab6572 100644
--- a/analyzer/utils/structures/hashmap.c
+++ b/analyzer/utils/structures/hashmap.c
@@ -9,8 +9,8 @@ HashMap *hashmap_new(
void (*value_cleanup)(void *key)
) {
HashMap *map = malloc(sizeof(HashMap));
- for (size_t i = 0; i < HASHMAP_TABLE_SIZE; i++)
- map->table[i] = NULL;
+ // initialize NULLs
+ memset(map->table, 0, sizeof(HashMapNode *) * HASHMAP_TABLE_SIZE);
map->key_size = key_size;
map->value_size = value_size;
map->hash = hash;