tree-wide: check if errno is greater than zero (2)
Compare errno with zero in a way that tells gcc that (if the condition is true) errno is positive.
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ int rm_rf_children(int fd, RemoveFlags flags, struct stat *root_dev) {
|
||||
errno = 0;
|
||||
de = readdir(d);
|
||||
if (!de) {
|
||||
if (errno != 0 && ret == 0)
|
||||
if (errno > 0 && ret == 0)
|
||||
ret = -errno;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user