resolved: llmnr, mdns: simplify error handling

sd_event_add_io() returns the error directly and does not mess with errno.
This commit is contained in:
Daniel Mack
2015-12-09 18:49:15 +01:00
parent b43d96b076
commit ee8d930568
2 changed files with 2 additions and 6 deletions
+1 -3
View File
@@ -461,10 +461,8 @@ int manager_llmnr_ipv6_tcp_fd(Manager *m) {
}
r = sd_event_add_io(m->event, &m->llmnr_ipv6_tcp_event_source, m->llmnr_ipv6_tcp_fd, EPOLLIN, on_llmnr_stream, m);
if (r < 0) {
r = -errno;
if (r < 0)
goto fail;
}
return m->llmnr_ipv6_tcp_fd;
+1 -3
View File
@@ -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;