Initialize addrinfo hint
This commit is contained in:
parent
94b9723917
commit
e2245da720
1 changed files with 4 additions and 1 deletions
|
@ -687,7 +687,10 @@ static bool add_listen_address(char *address, bool bindto) {
|
|||
*address = 0;
|
||||
}
|
||||
|
||||
struct addrinfo *ai, hint = {0};
|
||||
struct addrinfo *ai, hint;
|
||||
|
||||
memset(&hint, 0x0, sizeof(struct addrinfo));
|
||||
|
||||
hint.ai_family = addressfamily;
|
||||
hint.ai_socktype = SOCK_STREAM;
|
||||
hint.ai_protocol = IPPROTO_TCP;
|
||||
|
|
Loading…
Reference in a new issue