tree-wide: convert inet_ntop() calls to anonymous-buffer macros
This commit is contained in:
+2
-4
@@ -858,14 +858,12 @@ static int instance_from_socket(int fd, unsigned nr, char **instance) {
|
||||
be16toh(remote.in6.sin6_port)) < 0)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
char a[INET6_ADDRSTRLEN], b[INET6_ADDRSTRLEN];
|
||||
|
||||
if (asprintf(&r,
|
||||
"%u-%s:%u-%s:%u",
|
||||
nr,
|
||||
inet_ntop(AF_INET6, &local.in6.sin6_addr, a, sizeof(a)),
|
||||
IN6_ADDR_TO_STRING(&local.in6.sin6_addr),
|
||||
be16toh(local.in6.sin6_port),
|
||||
inet_ntop(AF_INET6, &remote.in6.sin6_addr, b, sizeof(b)),
|
||||
IN6_ADDR_TO_STRING(&remote.in6.sin6_addr),
|
||||
be16toh(remote.in6.sin6_port)) < 0)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user