diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:24:59 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-04-05 14:26:34 +0900 |
commit | 0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b (patch) | |
tree | ec4a63d91dcb18532b9e1513b7d9d7d2fdc2dcbe | |
parent | 1cc6c93a9569a9f2664d0d26cd0e50408307c430 (diff) | |
download | systemd-0dfb0a0abd98f8726a39f26e4d737f47ec0fd53b.tar.gz |
core/device: trivial simplification
-rw-r--r-- | src/core/device.c | 6 |
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); } |