tree-wide: remove a number of invocations of strerror() and replace by %m

Let's clean up our tree a bit, and reduce invocations of the
thread-unsafe strerror() by replacing it with printf()'s %m specifier.
This commit is contained in:
Lennart Poettering
2015-09-30 22:26:16 +02:00
parent 618234a525
commit e53fc357a9
15 changed files with 51 additions and 81 deletions
+4 -4
View File
@@ -38,19 +38,19 @@ int lldp_port_start(lldp_port *p) {
r = sd_event_add_io(p->event, &p->lldp_port_rx,
p->rawfd, EPOLLIN, lldp_receive_packet, p);
if (r < 0) {
log_debug("Failed to allocate event source: %s", strerror(-r));
return r;
log_debug_errno(r, "Failed to allocate event source: %m");
goto fail;
}
r = sd_event_source_set_priority(p->lldp_port_rx, p->event_priority);
if (r < 0) {
log_debug("Failed to set event priority: %s", strerror(-r));
log_debug_errno(r, "Failed to set event priority: %m");
goto fail;
}
r = sd_event_source_set_description(p->lldp_port_rx, "lldp-port-rx");
if (r < 0) {
log_debug("Failed to set event name: %s", strerror(-r));
log_debug_errno(r, "Failed to set event name: %m");
goto fail;
}