diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-01 11:15:50 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-01-01 13:36:43 -0500 |
commit | ef7532531942d59f81bfbd8a8f923f17e4827952 (patch) | |
tree | f686c9f60e39f34bdf6407d91d6cb67890847fe2 /src/network/networkctl.c | |
parent | e65ef51dee7a7d3565f471b67f29a257c6128fb3 (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/networkctl.c')
-rw-r--r-- | src/network/networkctl.c | 4 |
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++; } } |