sys/fs: fix check for negative return value
@@ -193,9 +193,9 @@ int fs_fopen(FILE **fp, const char *file, const char *mode)
goto fopen;
fd = open(file, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR);
- if (!fd)
+ if (fd == -1)
return errno;
- else
+
(void)close(fd);
fopen:
