a-lunev commented on a change in pull request #972:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/972#discussion_r789589963



##########
File path: netutils/netcat/netcat_main.c
##########
@@ -44,18 +44,23 @@
 # define NETCAT_PORT 31337
 #endif
 
+#ifndef NETCAT_IOBUF_SIZE
+# define NETCAT_IOBUF_SIZE 256
+#endif
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
 
 int do_io(int infd, int outfd)
 {
-  size_t capacity = 256;
-  char buf[capacity];
+  ssize_t avail;
+  ssize_t written;
+  char buf[NETCAT_IOBUF_SIZE];
 
   while (true)
     {
-      ssize_t avail = read(infd, buf, capacity);

Review comment:
       Yes, "ssize_t avail" was moved not because of C89. I moved it together 
with moving "ssize_t written" that was C89 related issue. So I moved "ssize_t 
avail" for uniformity reasons.




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