aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_multihashmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/container_multihashmap.c')
-rw-r--r--src/util/container_multihashmap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index 773b24928..bf5967513 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -192,17 +192,18 @@ GNUNET_CONTAINER_multihashmap_iterate (const struct
192 int count; 192 int count;
193 unsigned int i; 193 unsigned int i;
194 struct MapEntry *e; 194 struct MapEntry *e;
195 struct MapEntry *n;
195 196
196 count = 0; 197 count = 0;
197 for (i = 0; i < map->map_length; i++) 198 for (i = 0; i < map->map_length; i++)
198 { 199 {
199 e = map->map[i]; 200 n = map->map[i];
200 while (e != NULL) 201 while (NULL != (e = n))
201 { 202 {
203 n = e->next;
202 if ((NULL != it) && (GNUNET_OK != it (it_cls, &e->key, e->value))) 204 if ((NULL != it) && (GNUNET_OK != it (it_cls, &e->key, e->value)))
203 return GNUNET_SYSERR; 205 return GNUNET_SYSERR;
204 count++; 206 count++;
205 e = e->next;
206 } 207 }
207 } 208 }
208 return count; 209 return count;