fix coverity 10138
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Feb 2012 12:43:21 +0000 (12:43 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Feb 2012 12:43:21 +0000 (12:43 +0000)
src/transport/gnunet-service-transport_validation.c

index b631d8fdfb3ced87bfe4e3b8b5d0b24b432027ae..8a90f825bae3815f839c057c68becfff652515b6 100644 (file)
@@ -880,6 +880,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
   }
   pong->signature = *sig_cache;
 
+  GNUNET_assert (sender_address != NULL);
+
   /* first see if the session we got this PING from can be used to transmit
    * a response reliably */
   papi = GST_plugins_find (sender_address->transport_name);
@@ -890,7 +892,7 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
     GNUNET_assert (papi->send != NULL);
     GNUNET_assert (papi->get_session != NULL);
 
-    if ((session == NULL) && (sender_address != NULL))
+    if (session == NULL)
     {
       session = papi->get_session (papi->cls, sender_address);
     }