Initialize addrinfo hint

This commit is contained in:
thorkill 2015-06-30 19:20:57 +02:00
parent 94b9723917
commit e2245da720

View file

@ -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;