From d769849a484883fe973014fea696dc81f7687c3c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 22 Feb 2010 08:53:48 +0000 Subject: [PATCH] allow remove of current entry --- src/util/container_multihashmap.c | 7 ++++--- 1 file 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 int count; unsigned int i; struct MapEntry *e; + struct MapEntry *n; count = 0; for (i = 0; i < map->map_length; i++) { - e = map->map[i]; - while (e != NULL) + n = map->map[i]; + while (NULL != (e = n)) { + n = e->next; if ((NULL != it) && (GNUNET_OK != it (it_cls, &e->key, e->value))) return GNUNET_SYSERR; count++; - e = e->next; } } return count; -- 2.25.1