diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-01-11 14:31:14 -0500 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-05-17 15:22:15 +0200 |
commit | 1dc76d84ae35f23e10f37925df55bc66c61b0eaa (patch) | |
tree | 2491474e449948b6ea380bbeb35ff883cb9eab3e /src/basic/util.c | |
parent | 6d1d622bf1f4da725d11cbe5c57a757869ae54c6 (diff) |
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/basic/util.c')
-rw-r--r-- | src/basic/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/util.c b/src/basic/util.c index bfc6d046a..998fa7f1e 100644 --- a/src/basic/util.c +++ b/src/basic/util.c @@ -564,7 +564,7 @@ int on_ac_power(void) { errno = 0; de = readdir(d); - if (!de && errno != 0) + if (!de && errno > 0) return -errno; if (!de) |