pkarashchenko commented on a change in pull request #972:
URL:
https://github.com/apache/incubator-nuttx-apps/pull/972#discussion_r789402446
##########
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:
Actually this is not a C89 issue. Standard allows this.
--
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]