xiaoxiang781216 commented on code in PR #1559:
URL: https://github.com/apache/nuttx-apps/pull/1559#discussion_r1103741528


##########
system/readline/readline_fd.c:
##########
@@ -149,6 +156,13 @@ static void readline_write(FAR struct rl_common_s *vtbl,
   FAR struct readline_s *priv = (FAR struct readline_s *)vtbl;
   DEBUGASSERT(priv && buffer && buflen > 0);
 
+  /* If output fd is invalid, return directly. */
+
+  if (priv->outfd < 0)

Review Comment:
   should we move the check to readline/readline_fd? So, we don't need add the 
check in all caller of readline/readline_fd.



##########
system/readline/readline_fd.c:
##########
@@ -149,6 +156,13 @@ static void readline_write(FAR struct rl_common_s *vtbl,
   FAR struct readline_s *priv = (FAR struct readline_s *)vtbl;
   DEBUGASSERT(priv && buffer && buflen > 0);
 
+  /* If output fd is invalid, return directly. */
+
+  if (priv->outfd < 0)

Review Comment:
   should we move the check to readline/readline_fd? So, we don't need add the 
check in all callers of readline/readline_fd.



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