Skip to content

Commit

Permalink
remove arbitrary cap of 1000 iterations in hashmap_iterate
Browse files Browse the repository at this point in the history
  • Loading branch information
Mashpoe committed Jun 6, 2023
1 parent b4ca16d commit dedf70e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions map.c
Expand Up @@ -363,8 +363,6 @@ void hashmap_iterate(hashmap* m, hashmap_callback c, void* user_ptr)
// this way we can skip over empty buckets
struct bucket* current = m->first;

int co = 0;

while (current != NULL)
{
#ifdef __HASHMAP_REMOVABLE
Expand All @@ -374,13 +372,6 @@ void hashmap_iterate(hashmap* m, hashmap_callback c, void* user_ptr)
c((void*)current->key, current->ksize, current->value, user_ptr);

current = current->next;

if (co > 1000)
{
break;
}
co++;

}
}

Expand Down

0 comments on commit dedf70e

Please sign in to comment.