Follow up r16025 fixing gcc warning, special thanks to brian for noticing.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16028 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2012-05-01 22:35:47 +00:00
parent d1beddaeb1
commit b124a643c9

View File

@ -377,10 +377,11 @@ const char * geoip_countryname[253] = {"Unknown","Asia/Pacific Region","Europe",
unsigned char *geoip_cache;
void geoip_readdb(void){
struct stat bufa;
size_t fileReadCount;
FILE *db=fopen("./db/GeoIP.dat","r");
fstat(fileno(db), &bufa);
geoip_cache = (unsigned char *) malloc(sizeof(unsigned char) * bufa.st_size);
fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db);
fileReadCount = fread(geoip_cache, sizeof(unsigned char), bufa.st_size, db);
fclose(db);
ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
}