diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-02-13 16:33:24 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-02-13 16:33:24 +0000 |
commit | 92798aff74042af1df7c5296f364b81e535fa1aa (patch) | |
tree | 18f50ccc2b4e6e3f6a2014ca2e36fee4871547e6 /src/transport/plugin_transport_http.c | |
parent | 0e222925d3a1c5b31fc40d0bb5026cfde639ac95 (diff) | |
download | gnunet-92798aff74042af1df7c5296f364b81e535fa1aa.tar.gz gnunet-92798aff74042af1df7c5296f364b81e535fa1aa.zip |
- fixing coverity errrors
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r-- | src/transport/plugin_transport_http.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index b6e862aa3..f88ff3388 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -511,6 +511,10 @@ http_get_session (void *cls, | |||
511 | 511 | ||
512 | GNUNET_assert (plugin != NULL); | 512 | GNUNET_assert (plugin != NULL); |
513 | GNUNET_assert (address != NULL); | 513 | GNUNET_assert (address != NULL); |
514 | GNUNET_assert (address->address != NULL); | ||
515 | |||
516 | ats.type = htonl (GNUNET_ATS_ARRAY_TERMINATOR); | ||
517 | ats.value = htonl (GNUNET_ATS_ARRAY_TERMINATOR); | ||
514 | 518 | ||
515 | /* find existing session */ | 519 | /* find existing session */ |
516 | s = lookup_session (plugin, address); | 520 | s = lookup_session (plugin, address); |
@@ -543,7 +547,7 @@ http_get_session (void *cls, | |||
543 | s->ats_address_network_type = htonl (GNUNET_ATS_NET_UNSPECIFIED); | 547 | s->ats_address_network_type = htonl (GNUNET_ATS_NET_UNSPECIFIED); |
544 | 548 | ||
545 | /* Get ATS type */ | 549 | /* Get ATS type */ |
546 | if ((addrlen == sizeof (struct IPv4HttpAddress)) && (address->address != NULL)) | 550 | if (addrlen == sizeof (struct IPv4HttpAddress)) |
547 | { | 551 | { |
548 | struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) address->address; | 552 | struct IPv4HttpAddress *a4 = (struct IPv4HttpAddress *) address->address; |
549 | struct sockaddr_in s4; | 553 | struct sockaddr_in s4; |
@@ -556,7 +560,7 @@ http_get_session (void *cls, | |||
556 | #endif | 560 | #endif |
557 | ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s4, sizeof (struct sockaddr_in)); | 561 | ats = plugin->env->get_address_type (plugin->env->cls, (const struct sockaddr *) &s4, sizeof (struct sockaddr_in)); |
558 | } | 562 | } |
559 | if ((addrlen == sizeof (struct IPv6HttpAddress)) && (address->address != NULL)) | 563 | if (addrlen == sizeof (struct IPv6HttpAddress)) |
560 | { | 564 | { |
561 | struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) address->address; | 565 | struct IPv6HttpAddress *a6 = (struct IPv6HttpAddress *) address->address; |
562 | struct sockaddr_in6 s6; | 566 | struct sockaddr_in6 s6; |