assert
authorChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:17:34 +0000 (20:17 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 16 Jul 2011 20:17:34 +0000 (20:17 +0000)
src/core/gnunet-service-core.c
src/fs/gnunet-service-fs_pe.c

index 7a444847c9a86d972698be73f026d787666f44bd..eebb39581a4855cccc9d0499cc0803001c117afa 100644 (file)
@@ -1721,9 +1721,10 @@ free_neighbour (struct Neighbour *n)
       GNUNET_CONTAINER_DLL_remove (n->active_client_request_head,
                                   n->active_client_request_tail,
                                   car);
-      GNUNET_CONTAINER_multihashmap_remove (car->client->requests,
-                                           &n->peer.hashPubKey,
-                                           car);
+      GNUNET_assert (GNUNET_YES ==
+                    GNUNET_CONTAINER_multihashmap_remove (car->client->requests,
+                                                          &n->peer.hashPubKey,
+                                                          car));
       GNUNET_free (car);
     }
   if (NULL != n->th)
@@ -1924,7 +1925,7 @@ consider_free_neighbour (struct Neighbour *n)
       return;
     }
   /* actually free the neighbour... */
-  GNUNET_assert (GNUNET_OK ==
+  GNUNET_assert (GNUNET_YES ==
                 GNUNET_CONTAINER_multihashmap_remove (neighbours,
                                                       &n->peer.hashPubKey,
                                                       n));
@@ -4560,9 +4561,10 @@ handle_transport_notify_disconnect (void *cls,
       GNUNET_CONTAINER_DLL_remove (n->active_client_request_head,
                                   n->active_client_request_tail,
                                   car);
-      GNUNET_CONTAINER_multihashmap_remove (car->client->requests,
-                                           &n->peer.hashPubKey,
-                                           car);
+      GNUNET_assert (GNUNET_YES ==
+                    GNUNET_CONTAINER_multihashmap_remove (car->client->requests,
+                                                          &n->peer.hashPubKey,
+                                                          car));
       GNUNET_free (car);
     }
 
index e45585db6ae39e8adaa3a4ce3bc6cd12b6f09b1a..b62c20005257fe6b73413470f385437db0ef71c4 100644 (file)
@@ -389,7 +389,7 @@ GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp)
                                          &id.hashPubKey);
   if (NULL == pp)
     return; /* nothing was ever planned for this peer */
-  GNUNET_assert (GNUNET_OK ==
+  GNUNET_assert (GNUNET_YES ==
                 GNUNET_CONTAINER_multihashmap_remove (plans,
                                                       &id.hashPubKey,
                                                       pp));