From b001bc189b7cb51aa8b41a2b9493530395e6a909 Mon Sep 17 00:00:00 2001 From: Julius Bünger Date: Sat, 27 Mar 2021 01:23:46 +0100 Subject: -fix coverity issues wrt rps --- src/rps/gnunet-service-rps_custommap.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/rps/gnunet-service-rps_custommap.c') diff --git a/src/rps/gnunet-service-rps_custommap.c b/src/rps/gnunet-service-rps_custommap.c index 54e361d32..392c29397 100644 --- a/src/rps/gnunet-service-rps_custommap.c +++ b/src/rps/gnunet-service-rps_custommap.c @@ -206,6 +206,7 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_peer_map, struct GNUNET_PeerIdentity *p; uint32_t *last_index; struct GNUNET_PeerIdentity *last_p; + int ret; if (GNUNET_NO == CustomPeerMap_contains_peer (c_peer_map, peer)) @@ -234,9 +235,11 @@ CustomPeerMap_remove_peer (const struct CustomPeerMap *c_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_ONLY); + ret = GNUNET_CONTAINER_multihashmap32_put (c_peer_map->hash_map, + *index, + last_p, + GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY); + GNUNET_assert (GNUNET_OK == ret); GNUNET_CONTAINER_multihashmap32_remove_all (c_peer_map->hash_map, *last_index); *last_index = *index; -- cgit v1.2.3