fix bug in ipv6 parsing that prevented parsing a lone "::"
authorRich Felker <dalias@aerifal.cx>
Mon, 25 Apr 2011 21:49:21 +0000 (17:49 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 25 Apr 2011 21:49:21 +0000 (17:49 -0400)
src/network/inet_pton.c

index 5affb08d19dd7f6b0a3efcdba207472f8729bea6..bb16fb90b1b884fd74522dc719b12b78c64d1af0 100644 (file)
@@ -36,10 +36,7 @@ int inet_pton(int af, const char *s, void *a0)
                return -1;
        }
 
-       if (s[0]==':' && s[1]==':') {
-               s+=2;
-               brk=0;
-       }
+       if (s[0]==':' && s[1]==':') s++;
 
        for (i=0; ; i++, s+=j+1) {
                if (s[0]==':' && brk<0) {