Browse Source

[dfs] Fix dfs_file_ioctl return check on fcntl.

armink 7 years ago
parent
commit
c779104ef7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/dfs/src/dfs_posix.c

+ 1 - 1
components/dfs/src/dfs_posix.c

@@ -449,7 +449,7 @@ int fcntl(int fildes, int cmd, ...)
     }
     else ret = -EBADF;
 
-    if (ret != 0)
+    if (ret < 0)
     {
         rt_set_errno(ret);
         ret = -1;