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:
Xiang Xiao 2021-02-15 22:54:59 +08:00 committed by Abdelatif Guettouche
parent 35ec84ffca
commit 5f387bebc6

View file

@ -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;
}
}