summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/ers.c2
-rw-r--r--src/common/ers.h4
-rw-r--r--src/common/malloc.c4
-rw-r--r--src/common/malloc.h2
-rw-r--r--src/login/login.c2
-rw-r--r--src/map/battle.c14
-rw-r--r--src/map/guild.c2
7 files changed, 15 insertions, 15 deletions
diff --git a/src/common/ers.c b/src/common/ers.c
index ecdda4609..06bad92a4 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -245,7 +245,7 @@ static void ers_obj_free_entry(ERS self, void *entry)
* @see ERS_impl#size
* @see ERS_impl::vtable#entry_size
*/
-static uint32 ers_obj_entry_size(ERS self)
+static size_t ers_obj_entry_size(ERS self)
{
ERS_impl obj = (ERS_impl)self;
diff --git a/src/common/ers.h b/src/common/ers.h
index a9ba50073..47a076e6e 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -103,7 +103,7 @@ typedef struct eri {
* @param self Interface of the entry manager
* @return Size of the entries of this manager in bytes
*/
- uint32 (*entry_size)(struct eri *self);
+ size_t (*entry_size)(struct eri *self);
/**
* Destroy this instance of the manager.
@@ -120,7 +120,7 @@ typedef struct eri {
// Use memory manager to allocate/free and disable other interface functions
# define ers_alloc(obj,type) (type *)aMalloc(sizeof(type))
# define ers_free(obj,entry) aFree(entry)
-# define ers_entry_size(obj) (uint32)0
+# define ers_entry_size(obj) (size_t)0
# define ers_destroy(obj)
// Disable the public functions
# define ers_new(size) NULL
diff --git a/src/common/malloc.c b/src/common/malloc.c
index 93d03107b..c64f757bd 100644
--- a/src/common/malloc.c
+++ b/src/common/malloc.c
@@ -509,7 +509,7 @@ static void block_free(struct block* p)
hash_unfill[0] = p;
}
-unsigned int memmgr_usage (void)
+size_t memmgr_usage (void)
{
return memmgr_usage_bytes / 1024;
}
@@ -665,7 +665,7 @@ bool malloc_verify(void* ptr)
#endif
}
-unsigned int malloc_usage (void)
+size_t malloc_usage (void)
{
#ifdef USE_MEMMGR
return memmgr_usage ();
diff --git a/src/common/malloc.h b/src/common/malloc.h
index 609f0a700..aaf3e318d 100644
--- a/src/common/malloc.h
+++ b/src/common/malloc.h
@@ -156,7 +156,7 @@
////////////////////////////////////////////////
bool malloc_verify(void* ptr);
-unsigned int malloc_usage (void);
+size_t malloc_usage (void);
void malloc_init (void);
void malloc_final (void);
diff --git a/src/login/login.c b/src/login/login.c
index 2f987a735..b26256570 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -918,7 +918,7 @@ int mmo_auth(struct login_session_data* sd)
unsigned int i;
time_t raw_time;
char tmpstr[256];
- int len;
+ size_t len;
char user_password[32+1]; // reserve for md5-ed pw
char ip[16];
diff --git a/src/map/battle.c b/src/map/battle.c
index 51c8ca1d8..96ba93259 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2785,17 +2785,17 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
{
sd->state.arrow_atk = (sd->status.weapon == W_BOW || (sd->status.weapon >= W_REVOLVER && sd->status.weapon <= W_GRENADE));
if (sd->state.arrow_atk)
- { //Recycled damage variable to store index.
- damage = sd->equip_index[EQI_AMMO];
- if (damage<0) {
+ {
+ int index = sd->equip_index[EQI_AMMO];
+ if (index<0) {
clif_arrow_fail(sd,0);
return ATK_NONE;
}
//Ammo check by Ishizu-chan
- if (sd->inventory_data[damage])
+ if (sd->inventory_data[index])
switch (sd->status.weapon) {
case W_BOW:
- if (sd->inventory_data[damage]->look != A_ARROW) {
+ if (sd->inventory_data[index]->look != A_ARROW) {
clif_arrow_fail(sd,0);
return ATK_NONE;
}
@@ -2804,13 +2804,13 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
case W_RIFLE:
case W_GATLING:
case W_SHOTGUN:
- if (sd->inventory_data[damage]->look != A_BULLET) {
+ if (sd->inventory_data[index]->look != A_BULLET) {
clif_arrow_fail(sd,0);
return ATK_NONE;
}
break;
case W_GRENADE:
- if (sd->inventory_data[damage]->look != A_GRENADE) {
+ if (sd->inventory_data[index]->look != A_GRENADE) {
clif_arrow_fail(sd,0);
return ATK_NONE;
}
diff --git a/src/map/guild.c b/src/map/guild.c
index b4104f4d0..0f4ec272b 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -1594,7 +1594,7 @@ int guild_broken(int guild_id,int flag)
if( (gc=guild_castle_search(i)) != NULL ){
if(gc->guild_id == guild_id){
safestrncpy(name, gc->castle_event, 50);
- npc_event_do("::OnGuildBreak");
+ npc_event_do(strcat(name,"::OnGuildBreak"));
}
}
}