From 44d112e5022e8b2fe97e293a148d61aadedae15e Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Wed, 14 Sep 2016 23:09:14 +0000 Subject: -rps _custommap: more assertions (keep coverity happy?) --- src/rps/gnunet-service-rps_custommap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/rps') diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c index b88de8285..158dcc43c 100644 --- a/src/rps/gnunet-service-rps_custommap.c +++ b/src/rps/gnunet-service-rps_custommap.c @@ -209,9 +209,11 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_peer_map, GNUNET_CONTAINER_multihashmap32_get (c_peer_map->hash_map, CustomPeerMap_size (c_peer_map)); GNUNET_assert (NULL != last_p); + last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p); + GNUNET_assert (NULL != last_index); + GNUNET_assert (CustomPeerMap_size (c_peer_map) == *last_index); GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, last_p, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); - last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p); GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index); *last_index = *index; } -- cgit v1.2.3