From: Jan Moskyto Matejka Date: Mon, 11 Jan 2016 10:03:11 +0000 (+0100) Subject: Net address format: Do not print the -4 or -6 suffix in %I4 and %I6 X-Git-Tag: v2.0.0-pre0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a883adf954c2f68085a398e8ab38bd54831cf52;p=thirdparty%2Fbird.git Net address format: Do not print the -4 or -6 suffix in %I4 and %I6 --- diff --git a/lib/printf.c b/lib/printf.c index ce12202cc..318cee2c3 100644 --- a/lib/printf.c +++ b/lib/printf.c @@ -295,11 +295,13 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args) ip4_addr a = va_arg(args, ip4_addr); ip4_ntop(a, ipbuf); i = IP4_MAX_TEXT_LENGTH; + fmt++; } else if (fmt[1] == '6') { /* Explicit IPv6 address */ ip6_addr a = va_arg(args, ip6_addr); ip6_ntop(a, ipbuf); i = IP6_MAX_TEXT_LENGTH; + fmt++; } else { /* Just IP address */ ip_addr a = va_arg(args, ip_addr);