#include <sys/socket.h>
-#include <netinet/in.h>
#include <arpa/inet.h>
-#include <netdb.h>
#include <errno.h>
#include <stdio.h>
#include <string.h>
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);
}