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 a new issue