projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ldso: support DT_RELR relative relocation format
[musl]
/
src
/
network
/
inet_ntop.c
diff --git
a/src/network/inet_ntop.c
b/src/network/inet_ntop.c
index
ca33343
..
4bfef2c
100644
(file)
--- a/
src/network/inet_ntop.c
+++ b/
src/network/inet_ntop.c
@@
-1,7
+1,5
@@
#include <sys/socket.h>
#include <sys/socket.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
-#include <netdb.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
@@
-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;
}
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);
}
buf[best] = buf[best+1] = ':';
memmove(buf+best+2, buf+best+max, i-best-max+1);
}