-avoid side-effect in assertion
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_cache.c
index 6be53f00e9b4fc68597930dd351e122e143797f4..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
@@ -793,6 +793,7 @@ cache_get_handle (unsigned int peer_id, struct GSTCacheGetHandle *cgh,
     }
     return cgh;
   }
+  op = NULL;
   switch (cgh->type)
   {
   case CGT_TRANSPORT_HANDLE:
@@ -809,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);