X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Finet_pton.c;h=5c4850a685519f44200333acc882c2b6529b8e94;hb=b10d0230c1837be34e4ece7d6b11d19f1b578b9f;hp=5affb08d19dd7f6b0a3efcdba207472f8729bea6;hpb=34d81974d341e0174d1fc690b4d3e3b9b1767586;p=musl diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c index 5affb08d..5c4850a6 100644 --- a/src/network/inet_pton.c +++ b/src/network/inet_pton.c @@ -14,7 +14,7 @@ static int hexval(unsigned c) return -1; } -int inet_pton(int af, const char *s, void *a0) +int inet_pton(int af, const char *restrict s, void *restrict a0) { uint16_t ip[8]; unsigned char *a = a0; @@ -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) {