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/02/21 08:34:40 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5569: pty: Move the post process after reading the buffer

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



##########
File path: drivers/serial/pty.c
##########
@@ -452,17 +452,26 @@ static ssize_t pty_read(FAR struct file *filep, FAR char *buffer, size_t len)
   FAR struct pty_dev_s *dev;
   ssize_t ntotal;
 #ifdef CONFIG_SERIAL_TERMIOS
-  ssize_t nread;
-  size_t i;
-  char ch;
-  int ret;
+  ssize_t i = 0;

Review comment:
       But ntotal is ssize_t, and we do i < ntotal in for loop.




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