From 9f77ba244379346d461596bb4901a64a614746e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 30 May 2018 11:22:18 +0000 Subject: [PATCH] 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. --- src/core/dbus.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/core/dbus.c b/src/core/dbus.c index e535d9eda9e..b206f3af56c 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) { -- 2.47.3