You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/01 15:48:42 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6751: Net thread-safe ether_ntoa_r & inet_ntoa_r

xiaoxiang781216 commented on code in PR #6751:
URL: https://github.com/apache/incubator-nuttx/pull/6751#discussion_r934676777


##########
drivers/wireless/gs2200m.c:
##########
@@ -2018,7 +2018,10 @@ static enum pkt_type_e gs2200m_send_bulk(FAR struct gs2200m_dev_s *dev,
     }
   else
     {
-      wlinfo("** addr=%s port=%d\n", inet_ntoa(msg->addr.sin_addr),
+      char inetaddr[INET_ADDRSTRLEN + 2];

Review Comment:
   Here is the definition:
   ```
   /* Sizes of addresses (per OpenGroup.org) */
   
   #define INET_ADDRSTRLEN       16   /* nnn.nnn.nnn.nnn */
   #define INET6_ADDRSTRLEN      46   /* xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx */
   ```
   it's safe to define char inetaddr[INET_ADDRSTRLEN].



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org