unsigned int i;
struct MapEntry *e;
struct MapEntry *n;
+ GNUNET_HashCode kc;
count = 0;
for (i = 0; i < map->map_length; i++)
while (NULL != (e = n))
{
n = e->next;
- if ((NULL != it) && (GNUNET_OK != it (it_cls, &e->key, e->value)))
- return GNUNET_SYSERR;
+ if (NULL != it)
+ {
+ kc = e->key;
+ if (GNUNET_OK != it (it_cls, &kc, e->value))
+ return GNUNET_SYSERR;
+ }
count++;
}
}
n = e->next;
if (0 != memcmp (key, &e->key, sizeof (GNUNET_HashCode)))
continue;
- if ((it != NULL) && (GNUNET_OK != it (it_cls, &e->key, e->value)))
+ if ((it != NULL) && (GNUNET_OK != it (it_cls, key, e->value)))
return GNUNET_SYSERR;
count++;
}