mirror of
https://github.com/apache/nuttx.git
synced 2026-08-14 08:53:15 +00:00
lib_chdir:use change ret judgment method
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
79bcc662d9
commit
2d499ac86d
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ int chdir(FAR const char *path)
|
|||
/* Verify that 'path' refers to a directory */
|
||||
|
||||
ret = stat(path, &buf);
|
||||
if (ret != 0)
|
||||
if (ret < 0)
|
||||
{
|
||||
errcode = ENOENT;
|
||||
goto errout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue