patacongo commented on a change in pull request #425:
URL: 
https://github.com/apache/incubator-nuttx-apps/pull/425#discussion_r505547525



##########
File path: graphics/nxwm/src/cnxterm.cxx
##########
@@ -500,27 +500,18 @@ int CNxTerm::nxterm(int argc, char *argv[])
   // console).  (2) Don't bother trying to put debug instrumentation in the
   // following because it will end up in the NxTerm window.
 
-  std::fflush(stdout);
-  std::fflush(stderr);
-
 #ifdef CONFIG_NXTERM_NXKBDIN
-  std::fclose(stdin);
+  std::fflush(stdin);

Review comment:
       Using fflush with stdin is not appropriate.  fflush has no effect on 
input streams.  See 
https://pubs.opengroup.org/onlinepubs/007904975/functions/fflush.html
   
   It would be better to remove this and all other places where fflush is used 
with stdin since it does nothing.




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to