Improvements for example program

This commit is contained in:
Michael Kerrisk 2007-07-26 17:11:55 +00:00
parent a15ae69ad6
commit 59cef12337
1 changed files with 3 additions and 0 deletions

View File

@ -487,6 +487,9 @@ main(int argc, char *argv[])
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */
hints.ai_protocol = 0; /* Any protocol */
hints.ai_canonname = NULL;
hints.ai_addr = NULL;
hints.ai_next = NULL;
s = getaddrinfo(NULL, argv[1], &hints, &result);
if (s != 0) {