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/clif.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 9ee0a27bf..b71c8e21c 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -3054,8 +3054,8 @@ void clif_changelook(struct block_list *bl,int type,int val) val = sd->inventory_data[n]->view_id; else val = sd->status.inventory[n].nameid; - } - val = 0; + } else + val = 0; } #endif //Shoes? No packet uses this.... @@ -10047,14 +10047,14 @@ void clif_parse_WisMessage(int fd, struct map_session_data* sd) /// /b /nb (CZ_BROADCAST). /// Request to broadcast a message on whole server. /// 0099 .W .?B 00 -void clif_parse_Broadcast(int fd, struct map_session_data* sd) -{ +void clif_parse_Broadcast(int fd, struct map_session_data* sd) { char command[CHAT_SIZE_MAX+11]; char* msg = (char*)RFIFOP(fd,4); unsigned int len = RFIFOW(fd,2)-4; // as the length varies depending on the command used, just block unreasonably long strings - len = mes_len_check(msg, len, CHAT_SIZE_MAX); + mes_len_check(msg, len, CHAT_SIZE_MAX); + sprintf(command, "%ckami %s", atcommand_symbol, msg); is_atcommand(fd, sd, command, 1); } @@ -11248,7 +11248,7 @@ void clif_parse_LocalBroadcast(int fd, struct map_session_data* sd) unsigned int len = RFIFOW(fd,2)-4; // as the length varies depending on the command used, just block unreasonably long strings - len = mes_len_check(msg, len, CHAT_SIZE_MAX); + mes_len_check(msg, len, CHAT_SIZE_MAX); sprintf(command, "%clkami %s", atcommand_symbol, msg); is_atcommand(fd, sd, command, 1); @@ -12919,11 +12919,11 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd) void clif_parse_FriendsListReply(int fd, struct map_session_data *sd) { struct map_session_data *f_sd; - int char_id, account_id; + int account_id; char reply; account_id = RFIFOL(fd,2); - char_id = RFIFOL(fd,6); + //char_id = RFIFOL(fd,6); #if PACKETVER < 6 reply = RFIFOB(fd,10); #else -- cgit v1.2.3-60-g2f50