diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-06-27 14:25:45 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-06-27 14:25:45 +0000 |
commit | 413b5166b253c938e65d9c5ddd28ed85c93e8835 (patch) | |
tree | 1ffa0dc0cf0d5605eb969d48a347fbb44469dd88 /src/transport/plugin_transport_udp.c | |
parent | 23a2af1be3868d3da7e0e7a056c32ddb8f40c469 (diff) | |
download | gnunet-413b5166b253c938e65d9c5ddd28ed85c93e8835.tar.gz gnunet-413b5166b253c938e65d9c5ddd28ed85c93e8835.zip |
coverity and codesonar fixes
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 0d01e6c97..0f424b38a 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -830,7 +830,6 @@ process_interfaces (void *cls, | |||
830 | struct IPv6UdpAddress t6; | 830 | struct IPv6UdpAddress t6; |
831 | void *arg; | 831 | void *arg; |
832 | uint16_t args; | 832 | uint16_t args; |
833 | |||
834 | void *addr_nat; | 833 | void *addr_nat; |
835 | 834 | ||
836 | addr_nat = NULL; | 835 | addr_nat = NULL; |
@@ -886,6 +885,11 @@ process_interfaces (void *cls, | |||
886 | arg = &t6; | 885 | arg = &t6; |
887 | args = sizeof (t6); | 886 | args = sizeof (t6); |
888 | } | 887 | } |
888 | else | ||
889 | { | ||
890 | GNUNET_break (0); | ||
891 | return GNUNET_OK; | ||
892 | } | ||
889 | 893 | ||
890 | GNUNET_log (GNUNET_ERROR_TYPE_INFO | | 894 | GNUNET_log (GNUNET_ERROR_TYPE_INFO | |
891 | GNUNET_ERROR_TYPE_BULK, | 895 | GNUNET_ERROR_TYPE_BULK, |
@@ -1196,7 +1200,7 @@ udp_demultiplexer(struct Plugin *plugin, struct GNUNET_PeerIdentity *sender, | |||
1196 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "udp", | 1200 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, "udp", |
1197 | _("Received PROBE REPLY from port %d on incoming port %d\n"), ntohs(((struct sockaddr_in *)sender_addr)->sin_port), sockinfo->port); | 1201 | _("Received PROBE REPLY from port %d on incoming port %d\n"), ntohs(((struct sockaddr_in *)sender_addr)->sin_port), sockinfo->port); |
1198 | #endif | 1202 | #endif |
1199 | if (sizeof(sender_addr) == sizeof(struct IPv4UdpAddress)) | 1203 | if ((sender_addr != NULL) && (sizeof(sender_addr) == sizeof(struct IPv4UdpAddress))) |
1200 | { | 1204 | { |
1201 | memset(&addr_buf, 0, sizeof(addr_buf)); | 1205 | memset(&addr_buf, 0, sizeof(addr_buf)); |
1202 | if (NULL == inet_ntop (AF_INET, | 1206 | if (NULL == inet_ntop (AF_INET, |