summaryrefslogtreecommitdiff
path: root/src/map/instance.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-12-26 02:28:59 +0100
committerHaru <haru@dotalux.com>2016-05-08 19:53:57 +0200
commit2349b2a1528fe5dc41d930f8dd332df5ba521eb6 (patch)
tree3656a91a896f0ef090606b2b4c9184ad73153a3f /src/map/instance.c
parent58a7bf46508b7f186704e7efb39576e09f0ab866 (diff)
downloadhercules-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/map/instance.c')
-rw-r--r--src/map/instance.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/instance.c b/src/map/instance.c
index a6700d486..fa2cfec16 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -551,7 +551,7 @@ void instance_destroy(int instance_id) {
struct party_data *p = NULL;
struct guild *g = NULL;
short *iptr = NULL;
- int type, j;
+ int type;
unsigned int now = (unsigned int)time(NULL);
if( !instance->valid(instance_id) )
@@ -596,9 +596,10 @@ void instance_destroy(int instance_id) {
}
if( iptr != NULL ) {
- ARR_FIND(0, *icptr, j, iptr[j] == instance_id);
- if( j != *icptr )
- iptr[j] = -1;
+ int i;
+ ARR_FIND(0, *icptr, i, iptr[i] == instance_id);
+ if (i != *icptr)
+ iptr[i] = -1;
}
if (instance->list[instance_id].map) {