core: use fflush_and_check() where appropriate

This commit is contained in:
Lennart Poettering 2018-06-20 19:38:30 +02:00
parent 4e8113bbbe
commit 01d32c0030
1 changed files with 3 additions and 2 deletions

View File

@ -3108,8 +3108,9 @@ int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool switching_root) {
assert(m->n_reloading > 0);
m->n_reloading--;
if (ferror(f))
return -EIO;
r = fflush_and_check(f);
if (r < 0)
return r;
r = bus_fdset_add_all(m, fds);
if (r < 0)