tmedicci commented on code in PR #12790:
URL: https://github.com/apache/nuttx/pull/12790#discussion_r1697196004
##########
fs/spiffs/src/spiffs_vfs.c:
##########
@@ -1187,7 +1187,10 @@ static int spiffs_fstat(FAR const struct file *filep,
FAR struct stat *buf)
}
spiffs_unlock_volume(fs);
- return spiffs_map_errno(ret);
+
+ ret = spiffs_map_errno(ret);
+
+ return ret > 0 ? OK : ret;
Review Comment:
> Shouldn't it be:
>
> ```
> return ret >= 0 ? OK : ret;
> ```
It's the same, right? Because if it's equal to `0`, it will return `0`
(a.k.a `OK`). Am I missing something here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]