From 5fd515b039cadcb08019bca712d62667514825b8 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 30 Jan 2013 08:47:24 +0000 Subject: [PATCH] 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. --- libdnet-stripped/src/addr-util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libdnet-stripped/src/addr-util.c b/libdnet-stripped/src/addr-util.c index 973f16c0d..09c080734 100644 --- a/libdnet-stripped/src/addr-util.c +++ b/libdnet-stripped/src/addr-util.c @@ -227,8 +227,7 @@ ip6_ntop(const ip6_addr_t *ip6, char *dst, size_t len) len - (p - dst)) == NULL) return (NULL); return (dst); - } else p += sprintf(p, "%x:", - ntohs(data[i / 2])); + } else p += sprintf(p, "%x:", data[i / 2]); } if (best.base + 2 + best.len == IP6_ADDR_LEN) { *p = '\0';