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:
parent
d1beddaeb1
commit
b124a643c9
@ -377,10 +377,11 @@ const char * geoip_countryname[253] = {"Unknown","Asia/Pacific Region","Europe",
|
|||||||
unsigned char *geoip_cache;
|
unsigned char *geoip_cache;
|
||||||
void geoip_readdb(void){
|
void geoip_readdb(void){
|
||||||
struct stat bufa;
|
struct stat bufa;
|
||||||
|
size_t fileReadCount;
|
||||||
FILE *db=fopen("./db/GeoIP.dat","r");
|
FILE *db=fopen("./db/GeoIP.dat","r");
|
||||||
fstat(fileno(db), &bufa);
|
fstat(fileno(db), &bufa);
|
||||||
geoip_cache = (unsigned char *) malloc(sizeof(unsigned char) * bufa.st_size);
|
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);
|
fclose(db);
|
||||||
ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
|
ShowStatus("Finished Reading "CL_GREEN"GeoIP"CL_RESET" Database.\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user