From dedf70e0a769bc52a17a36da840d96770fc26d12 Mon Sep 17 00:00:00 2001 From: Mashpoe Date: Tue, 6 Jun 2023 16:49:08 -0600 Subject: [PATCH] remove arbitrary cap of 1000 iterations in hashmap_iterate --- map.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/map.c b/map.c index fe56ace..3dc2ef4 100644 --- a/map.c +++ b/map.c @@ -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 @@ -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++; - } }