1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00

fileio: write_string_stream_ts: check for file errors immediately

This commit is contained in:
Mike Gilbert 2017-12-28 10:03:47 -05:00
parent 94d3b60ff6
commit ba8b8c9e40

View File

@ -65,6 +65,9 @@ int write_string_stream_ts(
assert(f);
assert(line);
if (ferror(f))
return -EIO;
if (fputs(line, f) == EOF)
return -errno;