diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-01-11 11:03:11 +0100 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-01-13 13:21:25 +0100 |
commit | 9a883adf954c2f68085a398e8ab38bd54831cf52 (patch) | |
tree | ff2cf761e4468b3f133d41997d4e35fe759effe5 /lib | |
parent | a820ae107456a26656f29a3ed14010cf0cd87842 (diff) |
Net address format: Do not print the -4 or -6 suffix in %I4 and %I6
Diffstat (limited to 'lib')
-rw-r--r-- | lib/printf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/printf.c b/lib/printf.c index ce12202c..318cee2c 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); |