bneradt commented on a change in pull request #8421:
URL: https://github.com/apache/trafficserver/pull/8421#discussion_r729069624



##########
File path: iocore/net/UnixNetAccept.cc
##########
@@ -267,13 +267,15 @@ NetAccept::do_listen(bool non_blocking)
 
   if (server.fd != NO_FD) {
     if ((res = server.setup_fd_for_listen(non_blocking, opt))) {
-      Warning("unable to listen on main accept port %d: errno = %d, %s", 
ntohs(server.accept_addr.port()), errno, strerror(errno));
+      Warning("unable to listen on main accept port %d: errno = %d, %s", 
ntohs(server.accept_addr.network_order_port()), errno,
+              strerror(errno));
       goto Lretry;
     }
   } else {
   Lretry:
     if ((res = server.listen(non_blocking, opt))) {
-      Warning("unable to listen on port %d: %d %d, %s", 
ntohs(server.accept_addr.port()), res, errno, strerror(errno));
+      Warning("unable to listen on port %d: %d %d, %s", 
ntohs(server.accept_addr.network_order_port()), res, errno,
+              strerror(errno));

Review comment:
       This change helps highlight that this ntohs is unnecessary: we should 
just use host_order_port here and drop the ntohs.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to