337 iter.index = 0; |
337 iter.index = 0; |
338 |
338 |
339 if (map->size > 0) { |
339 if (map->size > 0) { |
340 struct cx_hash_map_s *hash_map = (struct cx_hash_map_s *) map; |
340 struct cx_hash_map_s *hash_map = (struct cx_hash_map_s *) map; |
341 struct cx_hash_map_element_s *elm = hash_map->buckets[0]; |
341 struct cx_hash_map_element_s *elm = hash_map->buckets[0]; |
342 for (; elm == NULL; iter.slot++) { |
342 while (elm == NULL) { |
343 elm = hash_map->buckets[iter.slot]; |
343 elm = hash_map->buckets[++iter.slot]; |
344 } |
344 } |
345 iter.elem_handle = elm; |
345 iter.elem_handle = elm; |
346 iter.kv_data.key = &elm->key; |
346 iter.kv_data.key = &elm->key; |
347 if (map->store_pointers) { |
347 if (map->store_pointers) { |
348 iter.kv_data.value = *(void **) elm->data; |
348 iter.kv_data.value = *(void **) elm->data; |