diff -r f69d88f86b9c -r c036a8b242a8 src/ucx/hash_map.c --- 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;