mirror of
https://github.com/apache/nuttx.git
synced 2026-08-30 21:53:06 +00:00
fs: Don't call _NX_SETERRNO in fopen and fdopen
since fs_fdopen always return the error code directly Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
35ec84ffca
commit
5f387bebc6
1 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ FAR FILE *fdopen(int fd, FAR const char *mode)
|
|||
ret = fs_fdopen(fd, oflags, NULL, &filep);
|
||||
if (ret < 0)
|
||||
{
|
||||
_NX_SETERRNO(ret);
|
||||
set_errno(-ret);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -122,7 +122,7 @@ FAR FILE *fopen(FAR const char *path, FAR const char *mode)
|
|||
|
||||
close(fd);
|
||||
|
||||
_NX_SETERRNO(ret);
|
||||
set_errno(-ret);
|
||||
filep = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue