diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-12-08 13:12:42 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-12-08 13:12:42 +0000 |
commit | a2465d1b4a41d0a25862a3e7e77bd88f60377e0b (patch) | |
tree | 2f63ef9871d625995e040ccc577646777f8ac70f | |
parent | 9eb085d490bce9c84beccbf66162e37991e1b9ac (diff) |
- fix loop for checking ifaddr on both IPv4 and IPv6
-rw-r--r-- | libc/inet/getaddrinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/inet/getaddrinfo.c b/libc/inet/getaddrinfo.c index 41abbe2de..f3440c8c3 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -186,7 +186,7 @@ static unsigned __check_pf(void) return seen; } - for (runp = ifa; runp != NULL; runp = runp->ifa_next) + for (runp = ifa; runp != NULL; runp = runp->ifa_next) { #if defined __UCLIBC_HAS_IPV4__ if (runp->ifa_addr->sa_family == PF_INET) seen |= SEEN_IPV4; @@ -195,7 +195,7 @@ static unsigned __check_pf(void) if (runp->ifa_addr->sa_family == PF_INET6) seen |= SEEN_IPV6; #endif /* __UCLIBC_HAS_IPV6__ */ - + } freeifaddrs(ifa); } #else |