chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Always use errno > 0 to help gcc
[elogind.git]
/
src
/
shared
/
fileio.c
diff --git
a/src/shared/fileio.c
b/src/shared/fileio.c
index 0eca4416f81f89901a00a64559f714b07fe26886..1c7d4851303af7ba9caae54809dc83207c8d55a5 100644
(file)
--- 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;