From: Stephen Hemminger Date: Tue, 11 Jan 2022 17:54:36 +0000 (-0800) Subject: tunnel: fix clang warning X-Git-Tag: v5.18.0~62^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5632cf69ad59b2081123fe7706dbb29e09e8a478;p=thirdparty%2Fiproute2.git tunnel: fix clang warning To fix clang warning about passing non-format string. Signed-off-by: Stephen Hemminger Signed-off-by: David Ahern --- diff --git a/ip/tunnel.c b/ip/tunnel.c index 88585cf31..f2632f43b 100644 --- a/ip/tunnel.c +++ b/ip/tunnel.c @@ -298,14 +298,7 @@ void tnl_print_endpoint(const char *name, const struct rtattr *rta, int family) value = "unknown"; } - if (is_json_context()) { - print_string(PRINT_JSON, name, NULL, value); - } else { - SPRINT_BUF(b1); - - snprintf(b1, sizeof(b1), "%s %%s ", name); - print_string(PRINT_FP, NULL, b1, value); - } + print_string_name_value(name, value); } void tnl_print_gre_flags(__u8 proto,