1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-19 05:59:01 +00:00

Get rid of ntohs in ip6_ntop.

Byte-swapping is handled by the initial loop that reads into an array of
16-bit integers. That initial loop was added by me in r29708.
This commit is contained in:
david
2013-01-30 08:47:24 +00:00
parent 570a77b414
commit 5fd515b039

View File

@@ -227,8 +227,7 @@ ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t len)
len - (p - dst)) == NULL) len - (p - dst)) == NULL)
return (NULL); return (NULL);
return (dst); return (dst);
} else p += sprintf(p, "%x:", } else p += sprintf(p, "%x:", data[i / 2]);
ntohs(data[i / 2]));
} }
if (best.base + 2 + best.len == IP6_ADDR_LEN) { if (best.base + 2 + best.len == IP6_ADDR_LEN) {
*p = '\0'; *p = '\0';