| 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 } |