Ouss4 commented on a change in pull request #2639:
URL: https://github.com/apache/incubator-nuttx/pull/2639#discussion_r550916990
##########
File path: fs/vfs/fs_dupfd.c
##########
@@ -73,7 +73,7 @@ int file_dup(FAR struct file *filep, int minfd)
fd2 = files_allocate(NULL, 0, 0, minfd);
if (fd2 < 0)
{
- return -EMFILE;
+ return fd2;
Review comment:
does `files_allocate` return `EMFILE` somehow?
The return of `file_dup` is the value that we gonna set `errno` to.
----------------------------------------------------------------
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:
[email protected]