fix uninitialized variables in dns lookup code
authorRich Felker <dalias@aerifal.cx>
Fri, 8 Apr 2011 03:18:12 +0000 (23:18 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 8 Apr 2011 03:18:12 +0000 (23:18 -0400)
src/network/__dns.c

index b8547bbafe307b41c5ddd6f1f7f112dfebfff5ba..cdd642991b5d1c9cdb818c28d3c21e3658e49246 100644 (file)
@@ -31,8 +31,8 @@ int __dns_doqueries(unsigned char *dest, const char *name, int *rr, int rrcnt)
                struct sockaddr_in6 sin6;
        } sa = {0}, ns[3] = {{0}};
        socklen_t sl;
-       int nns;
-       int family;
+       int nns = 0;
+       int family = AF_UNSPEC;
        unsigned char q[280] = "", *r = dest;
        int ql;
        int rlen;