Merge pull request #23616 from keszybz/in-addr-to-string-formatting

Add macros that allocate a fixed buffer for in_addr_to_string(), in_addr_prefix+to_string()
This commit is contained in:
Yu Watanabe
2022-06-09 15:21:57 +09:00
committed by GitHub
45 changed files with 323 additions and 444 deletions
+1 -3
View File
@@ -490,9 +490,7 @@ int sockaddr_pretty(
if (r < 0)
return -ENOMEM;
} else {
char a[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, &sa->in6.sin6_addr, a, sizeof(a));
const char *a = IN6_ADDR_TO_STRING(&sa->in6.sin6_addr);
if (include_port) {
if (asprintf(&p,