diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 13:19:16 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 13:29:21 +0100 |
commit | da927ba997d68401563b927f92e6e40e021a8e5c (patch) | |
tree | 71764cd998aef07b8943c5206c9307a93ba9c528 /src/resolve/resolved-bus.c | |
parent | 0a1beeb64207eaa88ab9236787b1cbc2f704ae14 (diff) |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values.
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 517d20eca9..c6b5915853 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -251,7 +251,7 @@ static void bus_method_resolve_hostname_complete(DnsQuery *q) { finish: if (r < 0) { - log_error_errno(-r, "Failed to send hostname reply: %m"); + log_error_errno(r, "Failed to send hostname reply: %m"); sd_bus_reply_method_errno(q->request, -r, NULL); } @@ -419,7 +419,7 @@ static void bus_method_resolve_address_complete(DnsQuery *q) { finish: if (r < 0) { - log_error_errno(-r, "Failed to send address reply: %m"); + log_error_errno(r, "Failed to send address reply: %m"); sd_bus_reply_method_errno(q->request, -r, NULL); } @@ -591,7 +591,7 @@ static void bus_method_resolve_record_complete(DnsQuery *q) { finish: if (r < 0) { - log_error_errno(-r, "Failed to send record reply: %m"); + log_error_errno(r, "Failed to send record reply: %m"); sd_bus_reply_method_errno(q->request, -r, NULL); } @@ -690,7 +690,7 @@ static int match_prepare_for_sleep(sd_bus *bus, sd_bus_message *message, void *u r = sd_bus_message_read(message, "b", &b); if (r < 0) { - log_debug_errno(-r, "Failed to parse PrepareForSleep signal: %m"); + log_debug_errno(r, "Failed to parse PrepareForSleep signal: %m"); return 0; } @@ -717,11 +717,11 @@ int manager_connect_bus(Manager *m) { * boot. Let's try in 5s again. As soon as we have * kdbus we can stop doing this... */ - log_debug_errno(-r, "Failed to connect to bus, trying again in 5s: %m"); + log_debug_errno(r, "Failed to connect to bus, trying again in 5s: %m"); r = sd_event_add_time(m->event, &m->bus_retry_event_source, CLOCK_MONOTONIC, now(CLOCK_MONOTONIC) + 5*USEC_PER_SEC, 0, on_bus_retry, m); if (r < 0) { - log_error_errno(-r, "Failed to install bus reconnect time event: %m"); + log_error_errno(r, "Failed to install bus reconnect time event: %m"); return r; } @@ -730,19 +730,19 @@ int manager_connect_bus(Manager *m) { r = sd_bus_add_object_vtable(m->bus, NULL, "/org/freedesktop/resolve1", "org.freedesktop.resolve1.Manager", resolve_vtable, m); if (r < 0) { - log_error_errno(-r, "Failed to register object: %m"); + log_error_errno(r, "Failed to register object: %m"); return r; } r = sd_bus_request_name(m->bus, "org.freedesktop.resolve1", 0); if (r < 0) { - log_error_errno(-r, "Failed to register name: %m"); + log_error_errno(r, "Failed to register name: %m"); return r; } r = sd_bus_attach_event(m->bus, m->event, 0); if (r < 0) { - log_error_errno(-r, "Failed to attach bus to event loop: %m"); + log_error_errno(r, "Failed to attach bus to event loop: %m"); return r; } @@ -755,7 +755,7 @@ int manager_connect_bus(Manager *m) { match_prepare_for_sleep, m); if (r < 0) - log_error_errno(-r, "Failed to add match for PrepareForSleep: %m"); + log_error_errno(r, "Failed to add match for PrepareForSleep: %m"); return 0; } |