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:
parent
94d3b60ff6
commit
ba8b8c9e40
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user