gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37933 - gnunet/src/rps


From: gnunet
Subject: [GNUnet-SVN] r37933 - gnunet/src/rps
Date: Thu, 15 Sep 2016 02:58:39 +0200

Author: ch3
Date: 2016-09-15 02:58:39 +0200 (Thu, 15 Sep 2016)
New Revision: 37933

Modified:
   gnunet/src/rps/gnunet-service-rps.c
   gnunet/src/rps/gnunet-service-rps_custommap.c
   gnunet/src/rps/test_rps.c
Log:
-rps: check return values

Modified: gnunet/src/rps/gnunet-service-rps.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps.c 2016-09-15 00:33:39 UTC (rev 37932)
+++ gnunet/src/rps/gnunet-service-rps.c 2016-09-15 00:58:39 UTC (rev 37933)
@@ -771,7 +771,7 @@
 static void
 remove_peer (const struct GNUNET_PeerIdentity *peer)
 {
-  View_remove_peer (peer);
+  (void) View_remove_peer (peer);
   CustomPeerMap_remove_peer (pull_map, peer);
   CustomPeerMap_remove_peer (push_map, peer);
   RPS_sampler_reinitialise_by_value (prot_sampler, peer);

Modified: gnunet/src/rps/gnunet-service-rps_custommap.c
===================================================================
--- gnunet/src/rps/gnunet-service-rps_custommap.c       2016-09-15 00:33:39 UTC 
(rev 37932)
+++ gnunet/src/rps/gnunet-service-rps_custommap.c       2016-09-15 00:58:39 UTC 
(rev 37933)
@@ -297,7 +297,9 @@
     GNUNET_assert (GNUNET_YES ==
         GNUNET_CONTAINER_multihashmap32_contains (c_peer_map->hash_map,
           CustomPeerMap_size (c_peer_map) -1));
-    CustomPeerMap_remove_peer_by_index (c_peer_map, CustomPeerMap_size 
(c_peer_map) -1);
+    GNUNET_assert (GNUNET_OK ==
+        CustomPeerMap_remove_peer_by_index (c_peer_map,
+                                            CustomPeerMap_size (c_peer_map) 
-1));
   }
   GNUNET_assert (0 == CustomPeerMap_size (c_peer_map));
 }

Modified: gnunet/src/rps/test_rps.c
===================================================================
--- gnunet/src/rps/test_rps.c   2016-09-15 00:33:39 UTC (rev 37932)
+++ gnunet/src/rps/test_rps.c   2016-09-15 00:58:39 UTC (rev 37933)
@@ -593,10 +593,11 @@
   rps_peer_ids[entry->index] = *(pinfo->result.id);
   rps_peers[entry->index].peer_id = &rps_peer_ids[entry->index];
 
-  GNUNET_CONTAINER_multipeermap_put (peer_map,
-      &rps_peer_ids[entry->index],
-      &rps_peers[entry->index],
-      GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY);
+  GNUNET_assert (GNUNET_OK ==
+      GNUNET_CONTAINER_multipeermap_put (peer_map,
+        &rps_peer_ids[entry->index],
+        &rps_peers[entry->index],
+        GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
   tofile ("/tmp/rps/peer_ids",
            "%u\t%s\n",
            entry->index,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]