[netperf-dev] netperf2 commit notice r339 - trunk/src
raj at netperf.org
raj at netperf.org
Thu Oct 8 14:36:08 PDT 2009
Author: raj
Date: 2009-10-08 14:36:07 -0700 (Thu, 08 Oct 2009)
New Revision: 339
Modified:
trunk/src/netsh.c
Log:
more fix
Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c 2009-10-08 21:17:08 UTC (rev 338)
+++ trunk/src/netsh.c 2009-10-08 21:36:07 UTC (rev 339)
@@ -969,26 +969,14 @@
}
} else {
/* resolve the hostname and pull the address family from the addrinfo */
- struct addrinfo *ai, *ai_tmp;
+ struct addrinfo *ai;
ai = resolve_host(host_name, NULL, address_family);
if (!ai) {
printf("Netperf could not resolve %s as a host name\n", host_name);
exit(-1);
}
- ai_tmp = ai;
- if (address_family != AF_UNSPEC) {
- for (; ai_tmp; ai_tmp = ai_tmp->ai_next) {
- if (address_family == ai_tmp->ai_family)
- break;
- }
- if (!ai_tmp) {
- printf("Netperf address family mismatch: host %s, family %d\n",
- host_name, address_family);
- exit(-1);
- }
- }
- address_family = ai_tmp->ai_family;
+ address_family = ai->ai_family;
freeaddrinfo(ai);
}
More information about the netperf-dev
mailing list