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 2021/12/29 13:10:55 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5104: net/tcp/udp: allocate tcp/udp connect dynamically

xiaoxiang781216 commented on a change in pull request #5104:
URL: https://github.com/apache/incubator-nuttx/pull/5104#discussion_r776311207



##########
File path: net/tcp/tcp_conn.c
##########
@@ -110,15 +108,12 @@ static FAR struct tcp_conn_s *
   tcp_listener(uint8_t domain, FAR const union ip_addr_u *ipaddr,
                uint16_t portno)
 {
-  FAR struct tcp_conn_s *conn;
-  int i;
+  FAR struct tcp_conn_s *conn = NULL;

Review comment:
       don't need `= NULL;`

##########
File path: net/tcp/tcp_conn.c
##########
@@ -656,8 +677,6 @@ FAR struct tcp_conn_s *tcp_alloc(uint8_t domain)
     }
 #endif
 
-  net_unlock();

Review comment:
       let's move tcp_alloc_conn after net_unlock?

##########
File path: net/tcp/tcp_conn.c
##########
@@ -61,6 +61,8 @@
 #include <nuttx/net/ip.h>
 #include <nuttx/net/tcp.h>
 
+#include <nuttx/kmalloc.h>

Review comment:
       move before line 57




-- 
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