summaryrefslogtreecommitdiff
path: root/src/fstab-generator/fstab-generator.c
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/fstab-generator/fstab-generator.c
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/fstab-generator/fstab-generator.c')
-rw-r--r--src/fstab-generator/fstab-generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 4eaa52d1c2..2790fc6e8e 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -69,7 +69,7 @@ static int mount_find_pri(struct mntent *me, int *ret) {
errno = 0;
r = strtoul(pri, &end, 10);
- if (errno != 0)
+ if (errno > 0)
return -errno;
if (end == pri || (*end != ',' && *end != 0))