acassis commented on code in PR #6370:
URL: https://github.com/apache/incubator-nuttx/pull/6370#discussion_r890110016


##########
libs/libc/stdio/lib_libfwrite.c:
##########
@@ -97,18 +94,11 @@ ssize_t lib_fwrite(FAR const void *ptr, size_t count, FAR 
FILE *stream)
       goto errout_with_semaphore;
     }
 
-  /* Loop until all of the bytes have been buffered */
+  /* Determine the number of bytes left in the buffer */
 
-  while (count > 0)
+  size_t gulp_size = stream->fs_bufend - stream->fs_bufpos;

Review Comment:
   Please define the gulp_size variable at top of function to comply with C89 
to get it working for 8-bit MCUs.



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