summaryrefslogtreecommitdiff
path: root/src/network/networkd-ipv4ll.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-30 22:16:17 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-30 22:26:16 +0200
commite53fc357a9bb9d0a5362ccc4246d598cb0febd5e (patch)
tree3bb6c3be9ba053e4a280b6c2ae8cd03be8f1ac6d /src/network/networkd-ipv4ll.c
parent618234a5258768359cb1086b152c5f08aaf89754 (diff)
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.
Diffstat (limited to 'src/network/networkd-ipv4ll.c')
-rw-r--r--src/network/networkd-ipv4ll.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/network/networkd-ipv4ll.c b/src/network/networkd-ipv4ll.c
index af3e3884e6..1902b3d23a 100644
--- a/src/network/networkd-ipv4ll.c
+++ b/src/network/networkd-ipv4ll.c
@@ -44,7 +44,7 @@ static int ipv4ll_address_lost(Link *link) {
r = address_new_dynamic(&address);
if (r < 0) {
- log_link_error(link, "Could not allocate address: %s", strerror(-r));
+ log_link_error_errno(link, r, "Could not allocate address: %m");
return r;
}
@@ -57,8 +57,7 @@ static int ipv4ll_address_lost(Link *link) {
r = route_new_dynamic(&route, RTPROT_UNSPEC);
if (r < 0) {
- log_link_error(link, "Could not allocate route: %s",
- strerror(-r));
+ log_link_error_errno(link, r, "Could not allocate route: %m");
return r;
}
@@ -82,7 +81,7 @@ static int ipv4ll_route_handler(sd_netlink *rtnl, sd_netlink_message *m, void *u
r = sd_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_link_error(link, "could not set ipv4ll route: %s", strerror(-r));
+ log_link_error_errno(link, r, "could not set ipv4ll route: %m");
link_enter_failed(link);
}
@@ -103,7 +102,7 @@ static int ipv4ll_address_handler(sd_netlink *rtnl, sd_netlink_message *m, void
r = sd_netlink_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_link_error(link, "could not set ipv4ll address: %s", strerror(-r));
+ log_link_error_errno(link, r, "could not set ipv4ll address: %m");
link_enter_failed(link);
} else if (r >= 0)
link_rtnl_process_address(rtnl, m, link->manager);