xiaoxiang781216 commented on code in PR #21144:
URL: https://github.com/apache/nuttx/pull/21144#discussion_r4419392028


##########
drivers/serial/serial_io.c:
##########
@@ -260,6 +313,13 @@ void uart_recvchars(FAR uart_dev_t *dev)
                 }
 
               nbytes = ret;
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP) || \
+    defined(CONFIG_TTY_FORCE_PANIC) || defined(CONFIG_TTY_LAUNCH)
+              sig = uart_check_special(dev, pbuf, nbytes);
+#endif
+#if defined(CONFIG_TTY_SIGINT) || defined(CONFIG_TTY_SIGTSTP)
+              nbytes = uart_discard_special(dev, pbuf, nbytes);

Review Comment:
   can we move check and discard in one function to avoid iterating the buffer 
twice?



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