Net address format: Do not print the -4 or -6 suffix in %I4 and %I6
This commit is contained in:
parent
a820ae1074
commit
9a883adf95
1 changed files with 2 additions and 0 deletions
|
@ -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_addr a = va_arg(args, ip4_addr);
|
||||||
ip4_ntop(a, ipbuf);
|
ip4_ntop(a, ipbuf);
|
||||||
i = IP4_MAX_TEXT_LENGTH;
|
i = IP4_MAX_TEXT_LENGTH;
|
||||||
|
fmt++;
|
||||||
} else if (fmt[1] == '6') {
|
} else if (fmt[1] == '6') {
|
||||||
/* Explicit IPv6 address */
|
/* Explicit IPv6 address */
|
||||||
ip6_addr a = va_arg(args, ip6_addr);
|
ip6_addr a = va_arg(args, ip6_addr);
|
||||||
ip6_ntop(a, ipbuf);
|
ip6_ntop(a, ipbuf);
|
||||||
i = IP6_MAX_TEXT_LENGTH;
|
i = IP6_MAX_TEXT_LENGTH;
|
||||||
|
fmt++;
|
||||||
} else {
|
} else {
|
||||||
/* Just IP address */
|
/* Just IP address */
|
||||||
ip_addr a = va_arg(args, ip_addr);
|
ip_addr a = va_arg(args, ip_addr);
|
||||||
|
|
Loading…
Reference in a new issue