[DFS] Fix `fd_new` failed return value.

This commit is contained in:
armink 2017-10-22 22:14:55 +08:00
parent b4831fbde4
commit b4168cc60d
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ int fd_new(void)
/* can't find an empty fd entry */ /* can't find an empty fd entry */
if (idx == DFS_FD_MAX) if (idx == DFS_FD_MAX)
{ {
idx = -1; idx = -(1 + DFS_FD_OFFSET);
goto __result; goto __result;
} }