aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-22 08:53:48 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-22 08:53:48 +0000
commitd769849a484883fe973014fea696dc81f7687c3c (patch)
tree73d2a9a6016946ef52c98d4096895a005bf7d742 /src
parent44975c15a11117b414afc0faba67350a08d1f505 (diff)
downloadgnunet-d769849a484883fe973014fea696dc81f7687c3c.tar.gz
gnunet-d769849a484883fe973014fea696dc81f7687c3c.zip
allow remove of current entry
Diffstat (limited to 'src')
-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;