yamt commented on code in PR #15577:
URL: https://github.com/apache/nuttx/pull/15577#discussion_r1917913312


##########
net/usrsock/usrsock_sendmsg.c:
##########
@@ -142,9 +143,18 @@ static int do_sendto_request(FAR struct usrsock_conn_s 
*conn,
   {
   };
 
-  struct iovec bufs[2 + msg->msg_iovlen];
+  struct iovec *bufs;
+  size_t iovlen;
+  int ret;
   int i;
 
+  iovlen = 2 + msg->msg_iovlen;
+  bufs = kmm_malloc(sizeof(*bufs) * iovlen);

Review Comment:
   i guess we can have a special case for small iovlen.



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to