mirror of
https://github.com/systemd/systemd.git
synced 2024-12-13 20:23:48 +08:00
core: fix return value in error path after sd_event_add_io() failure
sd_event_add_io() does not set errno, it returns negative errno. Noticed during log_*_errno conversions.
This commit is contained in:
parent
8d3d7072e6
commit
895b3a7b44
@ -692,10 +692,8 @@ static int manager_setup_notify(Manager *m) {
|
||||
|
||||
if (!m->notify_event_source) {
|
||||
r = sd_event_add_io(m->event, &m->notify_event_source, m->notify_fd, EPOLLIN, manager_dispatch_notify_fd, m);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to allocate notify event source: %m");
|
||||
return -errno;
|
||||
}
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to allocate notify event source: %m");
|
||||
|
||||
/* Process signals a bit earlier than SIGCHLD, so that we can
|
||||
* still identify to which service an exit message belongs */
|
||||
|
Loading…
Reference in New Issue
Block a user