lib_chdir:use change ret judgment method
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
parent
79bcc662d9
commit
2d499ac86d
@ -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…
Reference in New Issue
Block a user