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 /capture_ifinfo.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 'capture_ifinfo.c')
-rw-r--r-- | capture_ifinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/capture_ifinfo.c b/capture_ifinfo.c index a0a5dea2fd..87153ad2b3 100644 --- a/capture_ifinfo.c +++ b/capture_ifinfo.c @@ -167,10 +167,10 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void)) addr_parts = g_strsplit(if_parts[4], ",", 0); for (j = 0; addr_parts[j] != NULL; j++) { if_addr = g_new0(if_addr_t,1); - if (inet_pton(AF_INET, addr_parts[j], &if_addr->addr.ip4_addr)) { + if (inet_pton(AF_INET, addr_parts[j], &if_addr->addr.ip4_addr) > 0) { if_addr->ifat_type = IF_AT_IPv4; } else if (inet_pton(AF_INET6, addr_parts[j], - &if_addr->addr.ip6_addr)) { + &if_addr->addr.ip6_addr) > 0) { if_addr->ifat_type = IF_AT_IPv6; } else { g_free(if_addr); |