Skip to content

Commit 58f8370

Browse files
committed
Avoid transforms in address to text utility function
1 parent 74311a2 commit 58f8370

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

picoquic/util.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,15 +601,15 @@ char const* picoquic_addr_text(const struct sockaddr* addr, char* text, size_t t
601601
addr_text = inet_ntop(AF_INET,
602602
(const void*)(&((struct sockaddr_in*)addr)->sin_addr),
603603
addr_buffer, sizeof(addr_buffer));
604-
if (picoquic_sprintf(text, text_size, NULL, "%s:%d", addr_text, ntohs(((struct sockaddr_in*)addr)->sin_port)) == 0) {
604+
if (picoquic_sprintf(text, text_size, NULL, "%s:%d", addr_text, ((struct sockaddr_in*)addr)->sin_port) == 0) {
605605
ret_text = text;
606606
}
607607
break;
608608
case AF_INET6:
609609
addr_text = inet_ntop(AF_INET6,
610610
(const void*)(&((struct sockaddr_in6*)addr)->sin6_addr),
611611
addr_buffer, sizeof(addr_buffer));
612-
if (picoquic_sprintf(text, text_size, NULL, "[%s]:%d", addr_text, ntohs(((struct sockaddr_in6*)addr)->sin6_port)) == 0) {
612+
if (picoquic_sprintf(text, text_size, NULL, "[%s]:%d", addr_text, ((struct sockaddr_in6*)addr)->sin6_port) == 0) {
613613
ret_text = text;
614614
}
615615
default:

0 commit comments

Comments
 (0)