This commit is contained in:
Maix0 2024-05-12 11:40:41 +02:00
parent b4c6aed6c4
commit 7dc830a6ad
26 changed files with 48 additions and 1074 deletions

View file

@ -32,9 +32,7 @@ t_hashmap_env *new_hashmap_with_buckets_env(
t_drop_env_fn drop, t_usize buckets)
{
t_hashmap_env *hmap;
t_usize i;
i = 0;
hmap = mem_alloc(sizeof(*hmap));
if (hmap == NULL)
return (NULL);
@ -46,8 +44,6 @@ t_hashmap_env *new_hashmap_with_buckets_env(
hmap->drop = drop;
if (hmap->buckets == NULL)
return ((void)me_free(hmap), NULL);
while (i < buckets)
hmap->buckets[i++] = NULL;
return (hmap);
}