summaryrefslogtreecommitdiffstats
path: root/src/tmpfiles
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-01-11 20:31:14 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-01-13 21:10:17 +0100
commitb3267152783d5784c45010615045d4e8ee459da2 (patch)
tree4c616f8441b42dcb07cedad7958da2af3750dce2 /src/tmpfiles
parenttree-wide: check if errno is greater then zero (diff)
downloadsystemd-b3267152783d5784c45010615045d4e8ee459da2.tar.xz
systemd-b3267152783d5784c45010615045d4e8ee459da2.zip
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.
Diffstat (limited to 'src/tmpfiles')
-rw-r--r--src/tmpfiles/tmpfiles.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index f9a759e223..bb81ff5e3a 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -1075,7 +1075,7 @@ static int item_do_children(Item *i, const char *path, action_t action) {
errno = 0;
de = readdir(d);
if (!de) {
- if (errno != 0 && r == 0)
+ if (errno > 0 && r == 0)
r = -errno;
break;