From 8333c77edf8fd1654cd96f3f6ee0f078dd64b58b Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Thu, 28 Mar 2013 09:24:15 -0400 Subject: 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. --- src/tmpfiles/tmpfiles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tmpfiles/tmpfiles.c') diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 614644a0ab..918702e06f 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -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); -- cgit v1.2.3-54-g00ecf