summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-mdns.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-12-09 10:24:27 +0100
committerDaniel Mack <daniel@zonque.org>2015-12-09 18:49:15 +0100
commitee8d930568456a6fd3f4ea0117f900b957044209 (patch)
tree3f05bf5b91c9d1c8d0dcdf74f9525ea643e5b7be /src/resolve/resolved-mdns.c
parentb43d96b0764e63088429f746cd9e515f55286460 (diff)
resolved: llmnr, mdns: simplify error handling
sd_event_add_io() returns the error directly and does not mess with errno.
Diffstat (limited to 'src/resolve/resolved-mdns.c')
-rw-r--r--src/resolve/resolved-mdns.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c
index 096a4b1fe5..abe63d58c1 100644
--- a/src/resolve/resolved-mdns.c
+++ b/src/resolve/resolved-mdns.c
@@ -275,10 +275,8 @@ int manager_mdns_ipv6_fd(Manager *m) {
}
r = sd_event_add_io(m->event, &m->mdns_ipv6_event_source, m->mdns_ipv6_fd, EPOLLIN, on_mdns_packet, m);
- if (r < 0) {
- r = -errno;
+ if (r < 0)
goto fail;
- }
return m->mdns_ipv6_fd;