X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fnetwork%2Finet_ntop.c;h=76ae556c19196708b4b2bfd526a026bfd4b327ce;hp=460a9486c6e786b8bd25b78c64f364dd0e105f93;hb=f78cdbe8993d072bf60a65754544199016a1fe29;hpb=5b8d81f706da0b7dc0abb5d0d74595d5b2f60d52 diff --git a/src/network/inet_ntop.c b/src/network/inet_ntop.c index 460a9486..76ae556c 100644 --- a/src/network/inet_ntop.c +++ b/src/network/inet_ntop.c @@ -6,7 +6,7 @@ #include #include -const char *inet_ntop(int af, const void *a0, char *s, socklen_t l) +const char *inet_ntop(int af, const void *restrict a0, char *restrict s, socklen_t l) { const unsigned char *a = a0; int i, j, max, best; @@ -20,7 +20,7 @@ const char *inet_ntop(int af, const void *a0, char *s, socklen_t l) case AF_INET6: memset(buf, 'x', sizeof buf); buf[sizeof buf-1]=0; - snprintf(buf, sizeof buf, + snprintf(buf, sizeof buf, "%x:%x:%x:%x:%x:%x:%x:%x", 256*a[0]+a[1],256*a[2]+a[3], 256*a[4]+a[5],256*a[6]+a[7],