summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-22 20:33:06 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-22 20:33:06 +0000
commit082687fc204c7b40bf676ad710c2488048571b73 (patch)
tree59b356c4d4cc86122ef42c46d9500ddeb93ba6bc /src/map/clif.c
parenta31d779891778d76d1c0fac3544e6dd1627da98a (diff)
downloadhercules-082687fc204c7b40bf676ad710c2488048571b73.tar.gz
hercules-082687fc204c7b40bf676ad710c2488048571b73.tar.bz2
hercules-082687fc204c7b40bf676ad710c2488048571b73.tar.xz
hercules-082687fc204c7b40bf676ad710c2488048571b73.zip
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
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c16
1 files changed, 8 insertions, 8 deletions
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 <packet len>.W <text>.?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