aboutsummaryrefslogtreecommitdiff
path: root/src/or/geoip.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@torproject.org>2012-10-20 18:43:50 +0200
committerLinus Nordberg <linus@torproject.org>2012-10-20 20:56:59 +0200
commit172aac62ed13233072499dc4ae746f69333814c6 (patch)
tree45a26409dffc9eeafa75ecdcb28d979aee0567a8 /src/or/geoip.c
parentcb51807236844f208b94d53dce7fbc5183180f1d (diff)
downloadtor-172aac62ed13233072499dc4ae746f69333814c6.tar
tor-172aac62ed13233072499dc4ae746f69333814c6.tar.gz
Rename C reserved identifiers missed before.
Diffstat (limited to 'src/or/geoip.c')
-rw-r--r--src/or/geoip.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/geoip.c b/src/or/geoip.c
index 005a381e0..0097a7edf 100644
--- a/src/or/geoip.c
+++ b/src/or/geoip.c
@@ -62,14 +62,14 @@ static char geoip6_digest[DIGEST_LEN];
country_t
geoip_get_country(const char *country)
{
- void *_idxplus1;
+ void *idxplus1_;
intptr_t idx;
- _idxplus1 = strmap_get_lc(country_idxplus1_by_lc_code, country);
- if (!_idxplus1)
+ idxplus1_ = strmap_get_lc(country_idxplus1_by_lc_code, country);
+ if (!idxplus1_)
return -1;
- idx = ((uintptr_t)_idxplus1)-1;
+ idx = ((uintptr_t)idxplus1_)-1;
return (country_t)idx;
}
@@ -81,14 +81,14 @@ geoip_ipv4_add_entry(uint32_t low, uint32_t high, const char *country)
{
intptr_t idx;
geoip_ipv4_entry_t *ent;
- void *_idxplus1;
+ void *idxplus1_;
if (high < low)
return;
- _idxplus1 = strmap_get_lc(country_idxplus1_by_lc_code, country);
+ idxplus1_ = strmap_get_lc(country_idxplus1_by_lc_code, country);
- if (!_idxplus1) {
+ if (!idxplus1_) {
geoip_country_t *c = tor_malloc_zero(sizeof(geoip_country_t));
strlcpy(c->countrycode, country, sizeof(c->countrycode));
tor_strlower(c->countrycode);
@@ -96,7 +96,7 @@ geoip_ipv4_add_entry(uint32_t low, uint32_t high, const char *country)
idx = smartlist_len(geoip_countries) - 1;
strmap_set_lc(country_idxplus1_by_lc_code, country, (void*)(idx+1));
} else {
- idx = ((uintptr_t)_idxplus1)-1;
+ idx = ((uintptr_t)idxplus1_)-1;
}
{
geoip_country_t *c = smartlist_get(geoip_countries, idx);
@@ -177,14 +177,14 @@ geoip_ipv6_add_entry(struct in6_addr low, struct in6_addr high,
{
intptr_t idx;
geoip_ipv6_entry_t *ent;
- void *_idxplus1;
+ void *idxplus1_;
if (memcmp(&high, &low, sizeof(struct in6_addr)) < 0)
return;
- _idxplus1 = strmap_get_lc(country_idxplus1_by_lc_code, country);
+ idxplus1_ = strmap_get_lc(country_idxplus1_by_lc_code, country);
- if (!_idxplus1) {
+ if (!idxplus1_) {
geoip_country_t *c = tor_malloc_zero(sizeof(geoip_country_t));
strlcpy(c->countrycode, country, sizeof(c->countrycode));
tor_strlower(c->countrycode);
@@ -192,7 +192,7 @@ geoip_ipv6_add_entry(struct in6_addr low, struct in6_addr high,
idx = smartlist_len(geoip_countries) - 1;
strmap_set_lc(country_idxplus1_by_lc_code, country, (void*)(idx+1));
} else {
- idx = ((uintptr_t)_idxplus1)-1;
+ idx = ((uintptr_t)idxplus1_)-1;
}
{
geoip_country_t *c = smartlist_get(geoip_countries, idx);