src/network.c

changeset 87
d4d67105d4e1
parent 74
163c0ebacf14
equal deleted inserted replaced
86:f187e97f845e 87:d4d67105d4e1
55 return 1; 55 return 1;
56 } 56 }
57 } 57 }
58 58
59 static int getaddrinfo_intrnl(char *host, char *port, struct addrinfo **info) { 59 static int getaddrinfo_intrnl(char *host, char *port, struct addrinfo **info) {
60 struct addrinfo hints; 60 struct addrinfo hints = {0};
61 memset(&hints, 0, sizeof(hints));
62 hints.ai_socktype = SOCK_STREAM; 61 hints.ai_socktype = SOCK_STREAM;
63 hints.ai_protocol = IPPROTO_TCP; 62 hints.ai_protocol = IPPROTO_TCP;
64 63
65 return getaddrinfo(host, port, &hints, info); 64 return getaddrinfo(host, port, &hints, info);
66 } 65 }

mercurial