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


##########
libs/libc/stdio/lib_fflush.c:
##########
@@ -52,6 +52,41 @@
  *
  ****************************************************************************/
 
+int fflush_unlocked(FAR FILE *stream)
+{
+  int ret;
+
+  /* Is the stream argument NULL? */
+
+  if (!stream)

Review Comment:
   Optional
   ```suggestion
     if (stream == NULL)
   ```



##########
libs/libc/stdio/lib_libflushall.c:
##########
@@ -45,6 +45,55 @@
  *
  ****************************************************************************/
 
+int lib_flushall_unlocked(FAR struct streamlist *list)
+{
+  int lasterrno = OK;
+  int ret;
+
+  /* Make sure that there are streams associated with this thread */
+
+  if (list)
+    {
+      FAR FILE *stream;
+      int i;
+
+      /* Process each stream in the thread's stream list */
+
+      for (i = 0; i < 3; i++)
+        {
+          lib_fflush_unlocked(&list->sl_std[i]);
+        }
+
+      stream = list->sl_head;
+      for (; stream != NULL; stream = stream->fs_next)

Review Comment:
   Optional, just in case style will not be broken
   ```suggestion
         for (stream = list->sl_head; stream != NULL; stream = stream->fs_next)
   ```



##########
libs/libc/stdio/lib_libflushall.c:
##########
@@ -45,6 +45,55 @@
  *
  ****************************************************************************/
 
+int lib_flushall_unlocked(FAR struct streamlist *list)
+{
+  int lasterrno = OK;
+  int ret;
+
+  /* Make sure that there are streams associated with this thread */
+
+  if (list)

Review Comment:
   Optional
   ```suggestion
     if (list != NULL)
   ```



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