diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-30 11:22:18 +0000 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-31 20:42:07 +0200 |
commit | 9f77ba244379346d461596bb4901a64a614746e0 (patch) | |
tree | 6570a104ff41431420b0db9639a8a7d42c2138f7 /src/core/dbus.c | |
parent | 846e541830bce41fcea2f197ae1c8b34e2308cb6 (diff) | |
download | systemd-9f77ba244379346d461596bb4901a64a614746e0.tar.gz |
core/dbus: simplify bus_done_{api,system} functions
destroy_bus already has a check for NULL, so we don't need to repeat it here.
Diffstat (limited to 'src/core/dbus.c')
-rw-r--r-- | src/core/dbus.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c index e535d9eda9..b206f3af56 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -1098,17 +1098,11 @@ static void destroy_bus(Manager *m, sd_bus **bus) { } void bus_done_api(Manager *m) { - assert(m); - - if (m->api_bus) - destroy_bus(m, &m->api_bus); + destroy_bus(m, &m->api_bus); } void bus_done_system(Manager *m) { - assert(m); - - if (m->system_bus) - destroy_bus(m, &m->system_bus); + destroy_bus(m, &m->system_bus); } void bus_done_private(Manager *m) { |