Address compiler warning on older gcc

This commit is contained in:
Hamish Coleman 2023-07-04 08:17:49 +01:00
parent 183e0c969a
commit 6957b16537

View File

@ -742,7 +742,7 @@ extern char * sock_to_cstr (n2n_sock_str_t out,
memset(out, 0, N2N_SOCKBUF_SIZE);
if(AF_INET6 == sock->family) {
char tmp[sizeof(n2n_sock_str_t)];
char tmp[INET6_ADDRSTRLEN+1];
tmp[0] = '\0';
inet_ntop(AF_INET6, sock->addr.v6, tmp, sizeof(n2n_sock_str_t));