aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-20 19:38:30 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-20 23:59:29 +0200
commit01d32c0030565664e91a9be8689ab99ce5e3b366 (patch)
treebc7165880327d1e1a746608d945bd70d055c3d43
parentupdate TODO (diff)
downloadsystemd-01d32c0030565664e91a9be8689ab99ce5e3b366.tar.gz
systemd-01d32c0030565664e91a9be8689ab99ce5e3b366.tar.bz2
systemd-01d32c0030565664e91a9be8689ab99ce5e3b366.zip
core: use fflush_and_check() where appropriate
-rw-r--r--src/core/manager.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index df2f424f3..930df4e23 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -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)