summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:20:59 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 19:20:59 +0100
commit895b3a7b44fe7ca2f260986be2a877ff56a72718 (patch)
tree2ef65a0903699ed582754a73fd389f7d2241ce45 /src/core/manager.c
parent8d3d7072e609ef0e0fb37e1d19a29307d58146c3 (diff)
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.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 7b6172896d..a84272c905 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -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 */