diff options
author | Haru <haru@dotalux.com> | 2015-01-20 04:36:08 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-01-20 04:41:33 +0100 |
commit | 4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4 (patch) | |
tree | dab9d12a6a4b95a37598e27e6e86d6047360d61b /src/map/homunculus.c | |
parent | 03709c136ad300be631adfd38dc36c2433bda718 (diff) | |
download | hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.gz hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.bz2 hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.tar.xz hercules-4ae2b9b72dd4fce3d7a7778222d1c39abbb564a4.zip |
Minor fixes and tweaks suggested by cppcheck
- Variable scopes reduced
- Parenthesized ambiguous expressions
- Removed or added NULL checks where (un)necessary
- Corrected format strings
- Fixed typos potentially leading to bugs
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r-- | src/map/homunculus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 1d226749b..17336a00d 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -1211,7 +1211,6 @@ void homunculus_skill_db_read(void) { } void homunculus_exp_db_read(void) { - FILE *fp; char line[1024]; int i, j=0; char *filename[]={ @@ -1220,6 +1219,7 @@ void homunculus_exp_db_read(void) { memset(homun->exptable,0,sizeof(homun->exptable)); for(i = 0; i < 2; i++) { + FILE *fp; sprintf(line, "%s/%s", map->db_path, filename[i]); if( (fp=fopen(line,"r")) == NULL) { if(i != 0) |