Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed May 1, 2015
1 parent 35f2eda commit 17ec104
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/geoip.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1844,11 +1844,12 @@ function _get_region($gi, $ipnum)
$country_code = "CA";
$region = chr(($seek_region - CANADA_OFFSET) / 26 + 65) . chr(($seek_region - CANADA_OFFSET) % 26 + 65);
} else {
$country_code = $gi->GEOIP_COUNTRY_CODES[($seek_region - WORLD_OFFSET) / FIPS_RANGE];
$country_code = $gi->GEOIP_COUNTRY_CODES[(int) (($seek_region - WORLD_OFFSET) / FIPS_RANGE)];
$region = "";
}
return array($country_code, $region);
}
return null;
}

function geoip_region_by_addr($gi, $addr)
Expand Down
2 changes: 1 addition & 1 deletion src/geoipcity.inc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function _common_get_record($gi, $seek_country)
$record->postal_code = substr($record_buf, $record_buf_pos, $str_length);
}
$record_buf_pos += $str_length + 1;
$str_length = 0;

// Get latitude and longitude
$latitude = 0;
$longitude = 0;
Expand Down
2 changes: 1 addition & 1 deletion timezone/make_time_zone_php_code.pl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Get time zone
* @param string $country
* @param string $region
* @return string If the timezone is not found, returns NULL
* @return string If the timezone is not found, returns null`
*/
function get_time_zone($country, $region)
{
Expand Down

0 comments on commit 17ec104

Please sign in to comment.