src/ucx/hash_map.c

changeset 484
c036a8b242a8
parent 438
22eca559aded
child 490
d218607f5a7e
--- a/src/ucx/hash_map.c	Sun Mar 19 14:02:39 2023 +0100
+++ b/src/ucx/hash_map.c	Sun Mar 19 16:48:19 2023 +0100
@@ -302,12 +302,12 @@
 
     iter.slot = 0;
     iter.index = 0;
-
+    
     if (map->size > 0) {
         struct cx_hash_map_s *hash_map = (struct cx_hash_map_s *) map;
         struct cx_hash_map_element_s *elm = hash_map->buckets[0];
-        for (; elm == NULL; iter.slot++) {
-            elm = hash_map->buckets[iter.slot];
+        while (elm == NULL) {
+            elm = hash_map->buckets[++iter.slot];
         }
         iter.elem_handle = elm;
         iter.kv_data.key = &elm->key;

mercurial