2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

silence compiler warning

This commit is contained in:
Mark Andrews
2014-05-01 14:55:04 +10:00
parent 4442141672
commit ab02ecbb30

View File

@@ -615,7 +615,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
GeoIPRegion *region;
dns_geoip_subtype_t subtype;
isc_uint32_t ipnum = 0;
int maxlen = 0, id;
int maxlen = 0, id, family;
const char *cs;
char *s;
#ifdef HAVE_GEOIP_V6
@@ -626,7 +626,8 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
INSIST(geoip != NULL);
switch (reqaddr->family) {
family = reqaddr->family;
switch (family) {
case AF_INET:
ipnum = ntohl(reqaddr->type.in.s_addr);
break;
@@ -661,8 +662,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
INSIST(elt->as_string != NULL);
cs = country_lookup(db, subtype, reqaddr->family,
ipnum, ipnum6);
cs = country_lookup(db, subtype, family, ipnum, ipnum6);
if (cs != NULL && strncasecmp(elt->as_string, cs, maxlen) == 0)
return (ISC_TRUE);
break;
@@ -682,8 +682,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
if (db == NULL)
return (ISC_FALSE);
record = city_lookup(db, subtype,
reqaddr->family, ipnum, ipnum6);
record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
@@ -698,8 +697,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
if (db == NULL)
return (ISC_FALSE);
record = city_lookup(db, subtype,
reqaddr->family, ipnum, ipnum6);
record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
@@ -712,8 +710,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
if (db == NULL)
return (ISC_FALSE);
record = city_lookup(db, subtype,
reqaddr->family, ipnum, ipnum6);
record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
@@ -731,7 +728,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
INSIST(elt->as_string != NULL);
/* Region DB is not supported for IPv6 */
if (reqaddr->family == AF_INET6)
if (family == AF_INET6)
return (ISC_FALSE);
region = region_lookup(geoip->region, subtype, ipnum);
@@ -765,7 +762,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
INSIST(elt->as_string != NULL);
/* ISP, Org, AS, and Domain are not supported for IPv6 */
if (reqaddr->family == AF_INET6)
if (family == AF_INET6)
return (ISC_FALSE);
s = name_lookup(db, subtype, ipnum);
@@ -777,7 +774,7 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
INSIST(geoip->netspeed != NULL);
/* Netspeed DB is not supported for IPv6 */
if (reqaddr->family == AF_INET6)
if (family == AF_INET6)
return (ISC_FALSE);
id = netspeed_lookup(geoip->netspeed, subtype, ipnum);