summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-04-05 14:24:59 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-04-05 14:26:34 +0900
commit0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b (patch)
treeec4a63d91dcb18532b9e1513b7d9d7d2fdc2dcbe
parent1cc6c93a9569a9f2664d0d26cd0e50408307c430 (diff)
downloadsystemd-0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b.tar.gz
core/device: trivial simplification
-rw-r--r--src/core/device.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 66bfc30b5f..8ba55625cd 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);
}