fixing coverity bugs
authorMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Sep 2011 07:38:02 +0000 (07:38 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Thu, 15 Sep 2011 07:38:02 +0000 (07:38 +0000)
src/transport/gnunet-service-transport_neighbours.c
src/transport/transport-testing.c

index 9c3a65450a0bb0f2d87321603661268c5484b365..6c7e135cea0d7a2b2c000bdd0283f11958957b4b 100644 (file)
@@ -782,7 +782,7 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg,
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Could not send message to peer `%s': unknown neighbor",
                   GNUNET_i2s (target));
-    if (GNUNET_YES != n->is_connected)
+    else if (GNUNET_YES != n->is_connected)
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Could not send message to peer `%s': not connected\n",
                   GNUNET_i2s (target));
index 21856c8f268ba3157ef1c62aa807f5bdda1669e0..08bcd5c4e873491e7405d0cba703d4051223d01c 100644 (file)
@@ -408,8 +408,6 @@ GNUNET_TRANSPORT_TESTING_get_test_name (const char *file, char **dest)
   if (NULL != (dotexe = strstr (filename, ".exe")))
     dotexe[0] = '\0';
 
-  if (filename == NULL)
-    goto fail;
   goto suc;
 
 fail:
@@ -518,8 +516,6 @@ GNUNET_TRANSPORT_TESTING_get_config_name (const char *file, char **dest,
   if (NULL != (dotexe = strstr (filename, ".exe")))
     dotexe[0] = '\0';
 
-  if (filename == NULL)
-    goto fail;
   goto suc;
 
 fail: