Net address format: Do not print the -4 or -6 suffix in %I4 and %I6

This commit is contained in:
Jan Moskyto Matejka 2016-01-11 11:03:11 +01:00
parent a820ae1074
commit 9a883adf95

View file

@ -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);