From: Lennart Poettering Date: Thu, 17 Jan 2019 14:54:37 +0000 (+0100) Subject: initctl: shorten and update code a bit X-Git-Tag: v241-rc1~48^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aae82d1a36e01bf7efdaa51ec1c12664fef6db04;p=thirdparty%2Fsystemd.git initctl: shorten and update code a bit --- diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c index c60d4bd740a..260dc2eb618 100644 --- a/src/initctl/initctl.c +++ b/src/initctl/initctl.c @@ -233,12 +233,8 @@ static void server_done(Server *s) { while (s->fifos) fifo_free(s->fifos); - safe_close(s->epoll_fd); - - if (s->bus) { - sd_bus_flush(s->bus); - sd_bus_unref(s->bus); - } + s->epoll_fd = safe_close(s->epoll_fd); + s->bus = sd_bus_flush_close_unref(s->bus); } static int server_init(Server *s, unsigned n_sockets) {