From: Christian Grothoff Date: Fri, 2 Jul 2010 13:51:25 +0000 (+0000) Subject: redundant cases X-Git-Tag: initial-import-from-subversion-38251~21061 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a93ac678894076e74681fa9e10de0792a3894768;p=oweals%2Fgnunet.git redundant cases --- diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index 47936b336..93ee4c88e 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c @@ -1453,8 +1453,7 @@ check_port (struct Plugin *plugin, uint16_t in_port) if ( (plugin->behind_nat == GNUNET_YES) && (in_port == 0) ) return GNUNET_OK; if ( (plugin->only_nat_addresses == GNUNET_YES) && - (plugin->behind_nat == GNUNET_YES) && - (in_port != 0) ) + (plugin->behind_nat == GNUNET_YES) ) { return GNUNET_SYSERR; /* odd case... */ } diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 41cf19371..e54479b4f 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -1680,8 +1680,7 @@ check_port (struct Plugin *plugin, uint16_t in_port) if ( (plugin->behind_nat == GNUNET_YES) && (in_port == 0) ) return GNUNET_OK; if ( (plugin->only_nat_addresses == GNUNET_YES) && - (plugin->behind_nat == GNUNET_YES) && - (in_port != 0) ) + (plugin->behind_nat == GNUNET_YES) ) return GNUNET_SYSERR; /* odd case... */ if (in_port == plugin->port) return GNUNET_OK;