diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-19 15:09:53 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-19 15:09:53 +0100 |
commit | 5f0f8d749db5f005f72978a31959be4bfe46b495 (patch) | |
tree | 7660d999c461b712e4d825862cb812c0feaab476 /src/basic/fileio.c | |
parent | bcbd1d0cd5a1e6ff068f251c99ed7905223fed67 (diff) | |
parent | b3b0c23a56a2506a0d181af2f1775e3a98966c49 (diff) |
Merge pull request #2357 from keszybz/warnings-2
Remove gcc warnings v2
Diffstat (limited to 'src/basic/fileio.c')
-rw-r--r-- | src/basic/fileio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 3a237252b5..5ed5460904 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -165,7 +165,7 @@ int read_one_line_file(const char *fn, char **line) { if (!fgets(t, sizeof(t), f)) { if (ferror(f)) - return errno ? -errno : -EIO; + return errno > 0 ? -errno : -EIO; t[0] = 0; } @@ -1064,7 +1064,7 @@ int fflush_and_check(FILE *f) { fflush(f); if (ferror(f)) - return errno ? -errno : -EIO; + return errno > 0 ? -errno : -EIO; return 0; } |