From 0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 5 Apr 2018 14:24:59 +0900 Subject: [PATCH] core/device: trivial simplification --- src/core/device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/device.c b/src/core/device.c index 66bfc30b5f2..8ba55625cd3 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -659,10 +659,8 @@ static void device_shutdown(Manager *m) { m->udev_event_source = sd_event_source_unref(m->udev_event_source); - if (m->udev_monitor) { - udev_monitor_unref(m->udev_monitor); - m->udev_monitor = NULL; - } + if (m->udev_monitor) + m->udev_monitor = udev_monitor_unref(m->udev_monitor); m->devices_by_sysfs = hashmap_free(m->devices_by_sysfs); } -- 2.47.3