summaryrefslogtreecommitdiff
path: root/src/shared/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/fileio.c')
-rw-r--r--src/shared/fileio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
index 0eca4416f8..1c7d485130 100644
--- a/src/shared/fileio.c
+++ b/src/shared/fileio.c
@@ -364,7 +364,7 @@ int write_env_file(const char *fname, char **l) {
fflush(f);
if (ferror(f)) {
- if (errno != 0)
+ if (errno > 0)
r = -errno;
else
r = -EIO;