diff options
| author | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-12-08 19:57:16 +0000 | 
|---|---|---|
| committer | Carmelo Amoroso <carmelo.amoroso@st.com> | 2008-12-08 19:57:16 +0000 | 
| commit | 8fa1c38997f005c90cb5828be149ab32496bcd40 (patch) | |
| tree | 25d8a34be93eac65e0653086d0b5d456045ca62c | |
| parent | 7ab7b02f634c679e1e28474603d0d8c1254bc1ef (diff) | |
| download | uClibc-alpine-8fa1c38997f005c90cb5828be149ab32496bcd40.tar.bz2 uClibc-alpine-8fa1c38997f005c90cb5828be149ab32496bcd40.tar.xz  | |
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 c84236b19..9df279623 100644 --- a/libc/inet/getaddrinfo.c +++ b/libc/inet/getaddrinfo.c @@ -185,7 +185,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; @@ -194,7 +194,7 @@ static unsigned __check_pf(void)  			if (runp->ifa_addr->sa_family == PF_INET6)  				seen |= SEEN_IPV6;  #endif /* __UCLIBC_HAS_IPV6__ */ - +		}  		freeifaddrs(ifa);  	}  #else  | 
