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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user