From: Christian Grothoff Date: Mon, 22 Feb 2010 08:53:48 +0000 (+0000) Subject: allow remove of current entry X-Git-Tag: initial-import-from-subversion-38251~22650 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d769849a484883fe973014fea696dc81f7687c3c;p=oweals%2Fgnunet.git allow remove of current entry --- 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;