summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-11-25 18:19:10 -0500
committerDave Reisner <dreisner@archlinux.org>2013-11-25 18:19:49 -0500
commita9bc6d2df16c1d9f8a99d2cc9be2babf62bd173f (patch)
tree3b50e05ae434124c9c1c8cbc7b3864af05e920d0
parent4ae7885c2c4d89e1149c3fb186a4fe3b49787cc7 (diff)
networkd: use correct printf formatter
uint64_t can be formatted correctly with %ju, rather than casting to unsigned and potentially losing accuracy.
-rw-r--r--src/network/networkd-link.c16
-rw-r--r--src/network/networkd-network.c4
2 files changed, 10 insertions, 10 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index b93df63f21..ab5da3612e 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -126,7 +126,7 @@ static bool link_is_up(Link *link) {
}
static int link_enter_routes_set(Link *link) {
- log_info("Routes set for link %u", (unsigned)link->ifindex);
+ log_info("Routes set for link %ju", link->ifindex);
if (link_is_up(link))
return link_enter_configured(link);
@@ -150,8 +150,8 @@ static int route_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_warning("Could not set route on interface %u: %s",
- (unsigned)link->ifindex, strerror(-r));
+ log_warning("Could not set route on interface %ju: %s",
+ link->ifindex, strerror(-r));
return link_enter_failed(link);
}
@@ -185,7 +185,7 @@ static int link_enter_set_routes(Link *link) {
}
static int link_enter_addresses_set(Link *link) {
- log_info("Addresses set for link %u", (unsigned)link->ifindex);
+ log_info("Addresses set for link %ju", link->ifindex);
link->state = LINK_STATE_ADDRESSES_SET;
@@ -206,8 +206,8 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
r = sd_rtnl_message_get_errno(m);
if (r < 0 && r != -EEXIST) {
- log_warning("Could not set address on interface %u: %s",
- (unsigned)link->ifindex, strerror(-r));
+ log_warning("Could not set address on interface %ju: %s",
+ link->ifindex, strerror(-r));
link_enter_failed(link);
}
@@ -245,8 +245,8 @@ static int link_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) {
r = sd_rtnl_message_get_errno(m);
if (r < 0) {
- log_warning("Could not bring up interface %u: %s",
- (unsigned)link->ifindex, strerror(-r));
+ log_warning("Could not bring up interface %ju: %s",
+ link->ifindex, strerror(-r));
return link_enter_failed(link);
}
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index dc2af9dd24..eb3ff2316d 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -173,8 +173,8 @@ int network_get(Manager *manager, struct udev_device *device, Network **ret) {
int network_apply(Manager *manager, Network *network, Link *link) {
int r;
- log_info("Network '%s' being applied to link '%u'",
- network->description, (unsigned) link->ifindex);
+ log_info("Network '%s' being applied to link '%ju'",
+ network->description, link->ifindex);
link->network = network;