]> Zhao Yanbai Git Server - minix.git/commitdiff
LIBC - getifaddrs() fix
authorTomas Hruby <tom@minix3.org>
Thu, 11 Oct 2012 09:43:33 +0000 (09:43 +0000)
committerTomas Hruby <tom@minix3.org>
Thu, 11 Oct 2012 09:43:33 +0000 (09:43 +0000)
ifpa must be set to something meaningful every time it returns 0.

lib/libc/net/minix/getifaddrs.c

index 87ddc26ba7f9a90866f81f1381947f4a587a9455..5a54d98159818fb80f858e60895e84156bf56035 100644 (file)
@@ -34,6 +34,8 @@ getifaddrs(struct ifaddrs **ifap)
        addr.sin_addr.s_addr = 0;
        netmask.sin_addr.s_addr = 0;
 
+       *ifap = NULL;
+
        if(fd < 0) {
                char *ipd;