OSDN Git Service

- fix loop for checking ifaddr on both IPv4 and IPv6
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 8 Dec 2008 13:12:42 +0000 (13:12 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Mon, 8 Dec 2008 13:12:42 +0000 (13:12 -0000)
libc/inet/getaddrinfo.c

index 41abbe2..f3440c8 100644 (file)
@@ -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