diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-10-24 12:56:06 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-10-24 12:56:06 +0000 |
commit | eb614a4e0dea54cbc3146e938dcde709c879f8d8 (patch) | |
tree | 4d7c4adc384462706a243ec6685504ddf5a35314 /src/transport/plugin_transport_http_common.c | |
parent | 5742df4c179024daeb97780979482607f33790af (diff) | |
download | gnunet-eb614a4e0dea54cbc3146e938dcde709c879f8d8.tar.gz gnunet-eb614a4e0dea54cbc3146e938dcde709c879f8d8.zip |
-fix logic
Diffstat (limited to 'src/transport/plugin_transport_http_common.c')
-rw-r--r-- | src/transport/plugin_transport_http_common.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c index fc4c4a211..7ec8fa1e9 100644 --- a/src/transport/plugin_transport_http_common.c +++ b/src/transport/plugin_transport_http_common.c | |||
@@ -51,18 +51,10 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type, | |||
51 | asc, void *asc_cls) | 51 | asc, void *asc_cls) |
52 | { | 52 | { |
53 | const char *saddr = (const char *) addr; | 53 | const char *saddr = (const char *) addr; |
54 | if (NULL == saddr) | 54 | |
55 | { | 55 | if ( (NULL == saddr) || |
56 | asc (asc_cls, NULL); | 56 | (0 >= addrlen) || |
57 | return; | 57 | ('\0' != saddr[addrlen-1]) ) |
58 | } | ||
59 | if (0 >= addrlen) | ||
60 | if (NULL == saddr) | ||
61 | { | ||
62 | asc (asc_cls, NULL); | ||
63 | return; | ||
64 | } | ||
65 | if (saddr[addrlen-1] != '\0') | ||
66 | { | 58 | { |
67 | asc (asc_cls, NULL); | 59 | asc (asc_cls, NULL); |
68 | return; | 60 | return; |