X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fnetwork%2Finet_ntop.c;h=4bfef2c557ab4478afeb5c22f5d548fd69e51d3c;hb=2e5fff43dd7fc808197744c67cca7908ac19bb4f;hp=ca3334375128e086bcd49ec6e7c941de769d4ec8;hpb=f9dd79c8d191a8a5356d146c7ccf956677fea4e9;p=musl diff --git a/src/network/inet_ntop.c b/src/network/inet_ntop.c index ca333437..4bfef2c5 100644 --- a/src/network/inet_ntop.c +++ b/src/network/inet_ntop.c @@ -1,7 +1,5 @@ #include -#include #include -#include #include #include #include @@ -38,7 +36,7 @@ const char *inet_ntop(int af, const void *restrict a0, char *restrict s, socklen j = strspn(buf+i, ":0"); if (j>max) best=i, max=j; } - if (max>2) { + if (max>3) { buf[best] = buf[best+1] = ':'; memmove(buf+best+2, buf+best+max, i-best-max+1); }