pkarashchenko commented on code in PR #8704:
URL: https://github.com/apache/nuttx/pull/8704#discussion_r1124833942


##########
libs/libc/stream/lib_rawoutstream.c:
##########
@@ -46,27 +46,27 @@ static int rawoutstream_puts(FAR struct lib_outstream_s 
*this,
   FAR struct lib_rawoutstream_s *rthis =
                                 (FAR struct lib_rawoutstream_s *)this;
   int nwritten = 0;
-  int ret = 0;
 
-  while (nwritten != len)
+  do
     {
-      ret = _NX_WRITE(rthis->fd, (FAR const char *)buf + nwritten,
-                      len - nwritten);
-      if (ret <= 0)
+      nwritten = _NX_WRITE(rthis->fd, buf, len);
+      if (nwritten >= 0)

Review Comment:
   Yes, so I'm wondering why it follows the "success" path 



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