From 082687fc204c7b40bf676ad710c2488048571b73 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 22 Aug 2012 20:33:06 +0000 Subject: Major cleanup all over the place, made possible by mkbu95's scan-build report he provided us with. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16687 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/npc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/map/npc.c') diff --git a/src/map/npc.c b/src/map/npc.c index d5c7c021a..97b41e033 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -814,14 +814,13 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch) int npc_touch_areanpc_sub(struct block_list *bl, va_list ap) { struct map_session_data *sd; - int pc_id,npc_id; + int pc_id; char *name; nullpo_ret(bl); nullpo_ret((sd = map_id2sd(bl->id))); pc_id = va_arg(ap,int); - npc_id = va_arg(ap,int); name = va_arg(ap,char*); if( pc_ishiding(sd) ) @@ -854,7 +853,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap) nd->touching_id = sd->touching_id = 0; snprintf(name, ARRAYLENGTH(name), "%s::%s", nd->exname, script_config.ontouch_name); - map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,nd->bl.id,name); + map_forcountinarea(npc_touch_areanpc_sub,nd->bl.m,nd->bl.x - xs,nd->bl.y - ys,nd->bl.x + xs,nd->bl.y + ys,1,BL_PC,sd->bl.id,name); } return 0; } @@ -1649,11 +1648,10 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) // delete items for( i = 0; i < n; i++ ) { - int nameid, amount, idx; + int amount, idx; idx = item_list[i*2]-2; amount = item_list[i*2+1]; - nameid = sd->status.inventory[idx].nameid; if( sd->inventory_data[idx]->type == IT_PETEGG && sd->status.inventory[idx].card[0] == CARD0_PET ) { -- cgit v1.2.3-70-g09d2