From: Matthias Wachs Date: Wed, 22 Feb 2012 12:43:21 +0000 (+0000) Subject: fix coverity 10138 X-Git-Tag: initial-import-from-subversion-38251~14733 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=557f4d053010550a1a841c36312bcfbda1d3d947;p=oweals%2Fgnunet.git fix coverity 10138 --- diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index b631d8fdf..8a90f825b 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c @@ -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); }