mirror of
https://github.com/nmap/nmap.git
synced 2025-12-18 21:49: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:
@@ -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';
|
||||||
|
|||||||
Reference in New Issue
Block a user