diff options
author | Jens Granseuer <jensgr@gmx.net> | 2008-03-09 20:06:49 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2008-03-09 20:06:49 +0100 |
commit | 3cc17297124ea5c9917e6eacc0ab7ae021e8a386 (patch) | |
tree | 0ef6d2f260ae3d4a3979ac7058d7b253c08b572d /gethost.c | |
parent | 85459f9fee2ad4d5954e8f549df9a269cf3bff76 (diff) | |
download | xorg-app-xauth-3cc17297124ea5c9917e6eacc0ab7ae021e8a386.tar.gz |
C89 fix
65a0917d4661e370b50beed8f06f5577bfeea59f broke the build with non-C99
aware compilers.
Diffstat (limited to 'gethost.c')
-rw-r--r-- | gethost.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -295,6 +295,8 @@ struct addrlist *get_address_info ( hints.ai_protocol = 0; if (getaddrinfo(host,NULL,&hints,&firstai) !=0) return NULL; for (ai = firstai; ai != NULL; ai = ai->ai_next) { + struct addrlist *duplicate; + if (ai->ai_family == AF_INET) { struct sockaddr_in *sin = (struct sockaddr_in *)ai->ai_addr; src = &(sin->sin_addr); @@ -307,7 +309,6 @@ struct addrlist *get_address_info ( family = FamilyInternet6; } - struct addrlist *duplicate; for(duplicate = retval; duplicate != NULL; duplicate = duplicate->next) { if(duplicate->family == family && duplicate->len == len && memcmp(duplicate->address, src, len) == 0) { |