summaryrefslogtreecommitdiffstats
path: root/ip/iptuntap.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-12-10 14:20:32 -0800
committerStephen Hemminger <stephen@networkplumber.org>2018-12-10 14:20:32 -0800
commit90c5c969f0b9a2fbb0016b955fecc359aa884220 (patch)
tree2fca3289de773cd609bda327d915e4bd90820930 /ip/iptuntap.c
parent33fde2b60081ed9ac16f7dd81c48233803855689 (diff)
fix print_0xhex on 32 bit
The argument to print_0xhex is converted to unsigned long long so the format string give for normal printout has to be some variant of %llx. Otherwise, bogus values will be printed on 32 bit platforms. Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'ip/iptuntap.c')
-rw-r--r--ip/iptuntap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ip/iptuntap.c b/ip/iptuntap.c
index 528055a0..03238c3f 100644
--- a/ip/iptuntap.c
+++ b/ip/iptuntap.c
@@ -254,7 +254,7 @@ static void print_flags(long flags)
flags &= ~(IFF_TUN | IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE |
IFF_VNET_HDR | IFF_PERSIST | IFF_NOFILTER);
if (flags)
- print_0xhex(PRINT_ANY, NULL, "%#x", flags);
+ print_0xhex(PRINT_ANY, NULL, "%#llx", flags);
close_json_array(PRINT_JSON, NULL);
}