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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user