diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 15:55:09 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-06 23:21:25 +0900 |
commit | 05e6d9c64be181c2369e6ca68d2b78ca35647042 (patch) | |
tree | b9297a8470fc2f757cc3cd8ca3fa695c66289d6d | |
parent | ed63705975c2f1f5ce18d39a6dc762b810b0bd6c (diff) | |
download | systemd-05e6d9c64be181c2369e6ca68d2b78ca35647042.tar.gz systemd-05e6d9c64be181c2369e6ca68d2b78ca35647042.tar.bz2 systemd-05e6d9c64be181c2369e6ca68d2b78ca35647042.zip |
udevd: merge conditions to decrease indentation
-rw-r--r-- | src/udev/udevd.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 8bc0705012..0aec3acd07 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -1250,15 +1250,13 @@ static int on_sigchld(sd_event_source *s, const struct signalfd_siginfo *si, voi } else log_warning("worker ["PID_FMT"] exit with status 0x%04x", pid, status); - if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - if (worker->event) { - log_error("worker ["PID_FMT"] failed while handling '%s'", pid, worker->event->devpath); - /* delete state from disk */ - udev_device_delete_db(worker->event->dev); - udev_device_tag_index(worker->event->dev, NULL, false); - /* forward kernel event without amending it */ - udev_monitor_send_device(manager->monitor, NULL, worker->event->dev_kernel); - } + if ((!WIFEXITED(status) || WEXITSTATUS(status) != 0) && worker->event) { + log_error("worker ["PID_FMT"] failed while handling '%s'", pid, worker->event->devpath); + /* delete state from disk */ + udev_device_delete_db(worker->event->dev); + udev_device_tag_index(worker->event->dev, NULL, false); + /* forward kernel event without amending it */ + udev_monitor_send_device(manager->monitor, NULL, worker->event->dev_kernel); } worker_free(worker); |