diff options
-rw-r--r-- | src/util/container_multihashmap.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c index e291b8b50..773b24928 100644 --- a/src/util/container_multihashmap.c +++ b/src/util/container_multihashmap.c | |||
@@ -435,18 +435,18 @@ GNUNET_CONTAINER_multihashmap_get_multiple (const struct | |||
435 | { | 435 | { |
436 | int count; | 436 | int count; |
437 | struct MapEntry *e; | 437 | struct MapEntry *e; |
438 | struct MapEntry *n; | ||
438 | 439 | ||
439 | count = 0; | 440 | count = 0; |
440 | e = map->map[idx_of (map, key)]; | 441 | n = map->map[idx_of (map, key)]; |
441 | while (e != NULL) | 442 | while (NULL != (e = n)) |
442 | { | 443 | { |
443 | if (0 == memcmp (key, &e->key, sizeof (GNUNET_HashCode))) | 444 | n = e->next; |
444 | { | 445 | if (0 != memcmp (key, &e->key, sizeof (GNUNET_HashCode))) |
445 | if ((it != NULL) && (GNUNET_OK != it (it_cls, &e->key, e->value))) | 446 | continue; |
446 | return GNUNET_SYSERR; | 447 | if ((it != NULL) && (GNUNET_OK != it (it_cls, &e->key, e->value))) |
447 | count++; | 448 | return GNUNET_SYSERR; |
448 | } | 449 | count++; |
449 | e = e->next; | ||
450 | } | 450 | } |
451 | return count; | 451 | return count; |
452 | } | 452 | } |