diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-07-16 16:23:31 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-07-16 16:23:31 +0000 |
commit | 91ecc2334f2a0de5eb3fb2b6cc97c2948e9533f9 (patch) | |
tree | 4d4712ddf3b3953e9bee3f69c853b4cb68c998a9 /epan/dissectors/packet-uasip.c | |
parent | bb058987208733aaaf5aaeac74b0fadcbcd9918c (diff) |
"man inet_pton" only says that it returns a negative value, zero or a postive value, and not specifically -1, 0, or 1, so even though we know that's what wsutil's inet_pton will return, we shouldn't test against those exact values.
svn path=/trunk/; revision=50670
Diffstat (limited to 'epan/dissectors/packet-uasip.c')
-rw-r--r-- | epan/dissectors/packet-uasip.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/epan/dissectors/packet-uasip.c b/epan/dissectors/packet-uasip.c index 7f084842dc..622bf6505b 100644 --- a/epan/dissectors/packet-uasip.c +++ b/epan/dissectors/packet-uasip.c @@ -488,19 +488,16 @@ void proto_reg_handoff_uasip(void) use_proxy_ipaddr = FALSE; memset(proxy_ipaddr, 0, sizeof(proxy_ipaddr)); - if(uasip_enabled){ + if(uasip_enabled){ dissector_add_string("media_type", "application/octet-stream", uasip_handle); }else{ dissector_delete_string("media_type", "application/octet-stream", uasip_handle); } if (strcmp(pref_proxy_ipaddr_s, "") != 0) { - if (inet_pton(AF_INET, pref_proxy_ipaddr_s, proxy_ipaddr) == 1) - { + if (inet_pton(AF_INET, pref_proxy_ipaddr_s, proxy_ipaddr) > 0) { use_proxy_ipaddr = TRUE; - } - else - { + } else { g_warning("uasip: Invalid 'Proxy IP Address': \"%s\"", pref_proxy_ipaddr_s); } } |