pkarashchenko commented on a change in pull request #5848:
URL: https://github.com/apache/incubator-nuttx/pull/5848#discussion_r836275403



##########
File path: net/local/local_sockif.c
##########
@@ -718,6 +718,17 @@ static int local_ioctl(FAR struct socket *psock, int cmd,
 
   switch (cmd)
     {
+      case FIONBIO:
+        if (conn->lc_infile.f_inode != NULL)
+          {
+            ret = file_ioctl(&conn->lc_infile, cmd, arg);
+          }
+
+        if (conn->lc_outfile.f_inode != NULL)
+          {
+            ret = file_ioctl(&conn->lc_outfile, cmd, arg);
+          }

Review comment:
       Now it is much better. Thank you. By sample code I just wanted to 
highlight that overwriting of a failed `ret` is wrong and returning `OK` when 
both pipes are NULL is wrong as well.




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