aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps_custommap.c
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2016-09-14 23:09:14 +0000
committerJulius Bünger <buenger@mytum.de>2016-09-14 23:09:14 +0000
commit44d112e5022e8b2fe97e293a148d61aadedae15e (patch)
tree1c9036ee80a6ce1fa20cb2500dae4bc2cae8c377 /src/rps/gnunet-service-rps_custommap.c
parentc379df42750885d912c9905c16f6e807b355b1e0 (diff)
downloadgnunet-44d112e5022e8b2fe97e293a148d61aadedae15e.tar.gz
gnunet-44d112e5022e8b2fe97e293a148d61aadedae15e.zip
-rps _custommap: more assertions (keep coverity happy?)
Diffstat (limited to 'src/rps/gnunet-service-rps_custommap.c')
-rw-r--r--src/rps/gnunet-service-rps_custommap.c4
1 files changed, 3 insertions, 1 deletions
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,
209 GNUNET_CONTAINER_multihashmap32_get (c_peer_map->hash_map, 209 GNUNET_CONTAINER_multihashmap32_get (c_peer_map->hash_map,
210 CustomPeerMap_size (c_peer_map)); 210 CustomPeerMap_size (c_peer_map));
211 GNUNET_assert (NULL != last_p); 211 GNUNET_assert (NULL != last_p);
212 last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p);
213 GNUNET_assert (NULL != last_index);
214 GNUNET_assert (CustomPeerMap_size (c_peer_map) == *last_index);
212 GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, last_p, 215 GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, *index, last_p,
213 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST); 216 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST);
214 last_index = GNUNET_CONTAINER_multipeermap_get (c_peer_map->peer_map, last_p);
215 GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index); 217 GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index);
216 *last_index = *index; 218 *last_index = *index;
217 } 219 }