diff options
author | Haru <haru@dotalux.com> | 2015-12-26 02:28:59 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-05-08 19:53:57 +0200 |
commit | 2349b2a1528fe5dc41d930f8dd332df5ba521eb6 (patch) | |
tree | 3656a91a896f0ef090606b2b4c9184ad73153a3f /src/char/geoip.c | |
parent | 58a7bf46508b7f186704e7efb39576e09f0ab866 (diff) | |
download | hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.gz hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.bz2 hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.tar.xz hercules-2349b2a1528fe5dc41d930f8dd332df5ba521eb6.zip |
Fixed various issues pointed out by cppcheck
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char/geoip.c')
-rw-r--r-- | src/char/geoip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/char/geoip.c b/src/char/geoip.c index 433ff0918..002045850 100644 --- a/src/char/geoip.c +++ b/src/char/geoip.c @@ -132,9 +132,8 @@ void geoip_final(bool shutdown) **/ void geoip_init(void) { - int i, fno; + int fno; char db_type = 1; - unsigned char delim[3]; struct stat bufa; FILE *db; @@ -165,6 +164,8 @@ void geoip_init(void) if (fseek(db, -3l, SEEK_END) != 0) { db_type = 0; } else { + int i; + unsigned char delim[3]; for (i = 0; i < GEOIP_STRUCTURE_INFO_MAX_SIZE; i++) { if (fread(delim, sizeof(delim[0]), 3, db) != 3) { db_type = 0; |