Always use errno > 0 to help gcc

gcc thinks that errno might be negative, and functions could return
something positive on error (-errno). Should not matter in practice,
but makes an -O4 build much quieter.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2013-03-29 10:12:41 -04:00
parent 0db809489f
commit 8333c77edf
12 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -611,7 +611,7 @@ static int glob_item(Item *i, int (*action)(Item *, const char *)) {
if ((k = glob(i->path, GLOB_NOSORT|GLOB_BRACE, NULL, &g)) != 0) {
if (k != GLOB_NOMATCH) {
if (errno != 0)
if (errno > 0)
errno = EIO;
log_error("glob(%s) failed: %m", i->path);