remove direct call to addr in printing quad a for alpine support
This commit is contained in:
parent
a5c8188362
commit
435b32948b
1 changed files with 3 additions and 2 deletions
|
@ -79,10 +79,11 @@ void print_socket_addr(SocketAddr* addr, char* buffer) {
|
|||
ntohs(addr->data.v4.sin_port)
|
||||
);
|
||||
} else {
|
||||
uint8_t* a = (uint8_t*) &addr->data.v6.sin6_addr;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
APPEND(buffer, "%02hhx%02hhx:",
|
||||
addr->data.v6.sin6_addr.__in6_u.__u6_addr8[i*2 + 0],
|
||||
addr->data.v6.sin6_addr.__in6_u.__u6_addr8[i*2 + 1]
|
||||
a[i*2 + 0],
|
||||
a[i*2 + 1]
|
||||
);
|
||||
}
|
||||
APPEND(buffer, ":[%hu]", ntohs(addr->data.v6.sin6_port));
|
||||
|
|
Loading…
Reference in a new issue