summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-28 09:24:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-29 10:12:41 -0400
commit8333c77edf8fd1654cd96f3f6ee0f078dd64b58b (patch)
tree135da27f10763e512868c34155891864877f6622 /src/shared/util.h
parent0db809489fd88a320ae1023ffe36a9965e9a91b2 (diff)
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.
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index aefde5f85a..485733f650 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -595,7 +595,7 @@ int create_tmp_dir(char template[], char** dir_name);
#define FOREACH_DIRENT(de, d, on_error) \
for (errno = 0, de = readdir(d);; errno = 0, de = readdir(d)) \
if (!de) { \
- if (errno != 0) { \
+ if (errno > 0) { \
on_error; \
} \
break; \