summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-01 11:15:50 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-01 13:36:43 -0500
commitef7532531942d59f81bfbd8a8f923f17e4827952 (patch)
treef686c9f60e39f34bdf6407d91d6cb67890847fe2 /src/network
parente65ef51dee7a7d3565f471b67f29a257c6128fb3 (diff)
network: fix scanf/printf format
usec_t is defined as 64 bit wide, but long is 32 bit on many archs.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 15dfb81e2a..cc3ea85e8c 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -972,7 +972,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
time = now(CLOCK_BOOTTIME);
- sscanf(b, "%lu", &until);
+ sscanf(b, USEC_FMT, &until);
ttl = (until - time) / USEC_PER_SEC;
@@ -986,7 +986,7 @@ static int link_lldp_status(int argc, char *argv[], void *userdata) {
}
if (until > time) {
- printf("%10s %24s %16s %16lu %16s\n", links[i].name, chassis, port, ttl, cap);
+ printf("%10s %24s %16s %16"PRIu64" %16s\n", links[i].name, chassis, port, ttl, cap);
j++;
}
}