-avoid side-effect in assertion
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_cache.c
index 4a600b93180a1b270d558bad7e9492eaaebdbec1..1022c0959383d22d90e00c80cd269e2e199211eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
   This file is part of GNUnet.
-  (C) 2012 Christian Grothoff (and other contributing authors)
+  (C) 2008--2013 Christian Grothoff (and other contributing authors)
 
   GNUnet is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
@@ -540,8 +540,6 @@ peer_connect_notify_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
  *
  * @param cls closure
  * @param peer the peer that connected
- * @param ats performance data
- * @param ats_count number of entries in ats (excluding 0-termination)
  */
 static void
 transport_peer_connect_notify_cb (void *cls,
@@ -643,13 +641,9 @@ core_startup_cb (void *cls, struct GNUNET_CORE_Handle *server,
  *
  * @param cls closure
  * @param peer peer identity this notification is about
- * @param atsi performance data for the connection
- * @param atsi_count number of records in 'atsi'
  */
 static void
-core_peer_connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
-                      const struct GNUNET_ATS_Information *atsi,
-                      unsigned int atsi_count)
+core_peer_connect_cb (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   peer_connect_notify_cb (cls, peer, CGT_CORE_HANDLE);
 }
@@ -799,6 +793,7 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh,
     }
     return cgh;
   }
+  op = NULL;
   switch (cgh->type)
   {
   case CGT_TRANSPORT_HANDLE:
@@ -815,6 +810,8 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh,
                                            &oprelease_get_handle_core);
     entry->core_op = op;
     break;
+  default:
+    GNUNET_assert (0);
   }
   GNUNET_TESTBED_operation_queue_insert_ (GST_opq_openfds, op);
   GNUNET_TESTBED_operation_begin_wait_ (op);