summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-26 17:51:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-26 17:51:52 +0300
commitc9673032ff9fb5b5c1a223432181d60184685d5a (patch)
treeca0137610ba9d08093fce187996921067a9725d4 /src
parent2114f859d5b1d6984809494870f5266f53d662c7 (diff)
downloadevol-hercules-c9673032ff9fb5b5c1a223432181d60184685d5a.tar.gz
evol-hercules-c9673032ff9fb5b5c1a223432181d60184685d5a.tar.bz2
evol-hercules-c9673032ff9fb5b5c1a223432181d60184685d5a.tar.xz
evol-hercules-c9673032ff9fb5b5c1a223432181d60184685d5a.zip
Remove useless casts after server update.
Diffstat (limited to 'src')
-rw-r--r--src/echar/char.c2
-rw-r--r--src/elogin/parse.c8
-rw-r--r--src/emap/clif.c6
-rw-r--r--src/emap/map.c4
-rw-r--r--src/emap/parse.c8
-rw-r--r--src/emap/script.c4
-rw-r--r--src/emap/send.c12
7 files changed, 22 insertions, 22 deletions
diff --git a/src/echar/char.c b/src/echar/char.c
index f8a003e..ecf02ca 100644
--- a/src/echar/char.c
+++ b/src/echar/char.c
@@ -59,7 +59,7 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
}
}
- const int result = chr->make_new_char_sql(sd, (char*)RFIFOP(fd, 2), 1, 1, 1, 1, 1, 1, RFIFOB(fd, 26), RFIFOW(fd, 27), RFIFOW(fd, 29));
+ const int result = chr->make_new_char_sql(sd, RFIFOP(fd, 2), 1, 1, 1, 1, 1, 1, RFIFOB(fd, 26), RFIFOW(fd, 27), RFIFOW(fd, 29));
if (result < 0)
{
chr->creation_failed(fd, result);
diff --git a/src/elogin/parse.c b/src/elogin/parse.c
index a59bdb6..5253d9b 100644
--- a/src/elogin/parse.c
+++ b/src/elogin/parse.c
@@ -54,7 +54,7 @@ int elogin_parse_client_login_pre(int *fdPtr,
return 1;
}
char username[NAME_LENGTH];
- safestrncpy(username, (const char*)RFIFOP(fd, 6), NAME_LENGTH);
+ safestrncpy(username, RFIFOP(fd, 6), NAME_LENGTH);
int len = safestrnlen(username, NAME_LENGTH);
if (clientVersion < 2)
{
@@ -93,7 +93,7 @@ void elogin_parse_client_login2(int fd)
uint8 clienttype;
int result;
- safestrncpy(username, (const char*)RFIFOP(fd, 2), NAME_LENGTH);
+ safestrncpy(username, RFIFOP(fd, 2), NAME_LENGTH);
int len = safestrnlen(username, NAME_LENGTH);
if (len < 2 || !(username[len - 2] == '_') || !memchr("FfMm", username[len - 1], 4))
@@ -102,8 +102,8 @@ void elogin_parse_client_login2(int fd)
return;
}
- safestrncpy(password, (const char*)RFIFOP(fd, 26), NAME_LENGTH);
- safestrncpy(email, (const char*)RFIFOP(fd, 51), 40);
+ safestrncpy(password, RFIFOP(fd, 26), NAME_LENGTH);
+ safestrncpy(email, RFIFOP(fd, 51), 40);
clienttype = RFIFOB(fd, 50);
struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data;
diff --git a/src/emap/clif.c b/src/emap/clif.c
index 7aaf3d0..11b542f 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -1189,7 +1189,7 @@ void eclif_sendbgemblem_area(struct map_session_data *sd)
WBUFW(buf, 0) = 0xb1a;
WBUFL(buf, 2) = sd->bl.id;
- safestrncpy((char*)WBUFP(buf,6), sd->status.name, NAME_LENGTH); // name don't show in screen.
+ safestrncpy(WBUFP(buf,6), sd->status.name, NAME_LENGTH); // name don't show in screen.
WBUFW(buf, 30) = sd->bg_id;
WBUFW(buf, 32) = data->teamId;
clif->send(buf, 34, &sd->bl, AREA);
@@ -1206,7 +1206,7 @@ void eclif_sendbgemblem_single(int *fdPtr, struct map_session_data *sd)
WFIFOHEAD(fd, 34);
WFIFOW(fd, 0) = 0xb1a;
WFIFOL(fd, 2) = sd->bl.id;
- safestrncpy((char*)WFIFOP(fd, 6), sd->status.name, NAME_LENGTH);
+ safestrncpy(WFIFOP(fd, 6), sd->status.name, NAME_LENGTH);
WFIFOW(fd, 30) = sd->bg_id;
WFIFOW(fd, 32) = data->teamId;
WFIFOSET(fd, 34);
@@ -1236,6 +1236,6 @@ void eclif_disp_message(struct block_list* src,
WBUFW(buf, 0) = 0x8e;
WBUFW(buf, 2) = len + 5;
- safestrncpy((char*)WBUFP(buf, 4), mes, len + 1);
+ safestrncpy(WBUFP(buf, 4), mes, len + 1);
clif->send(buf, WBUFW(buf, 2), src, *targetPtr);
}
diff --git a/src/emap/map.c b/src/emap/map.c
index e08d31f..8f5c54f 100644
--- a/src/emap/map.c
+++ b/src/emap/map.c
@@ -186,14 +186,14 @@ static int getWalkMask(const struct block_list *bl)
int walkMask = 0;
if (bl->type == BL_NPC)
{
- TBL_NPC *nd = (TBL_NPC*)bl;
+ TBL_NPC *nd = (TBL_NPC *)bl;
struct NpcdExt *ext = npcd_get(nd);
if (ext)
walkMask = ext->walkMask;
}
else if (bl->type == BL_MOB)
{
- TBL_MOB *md = (TBL_MOB*)bl;
+ TBL_MOB *md = (TBL_MOB *)bl;
struct MobdExt *ext = mobd_get_by_mob(md);
if (ext)
walkMask = ext->walkMask;
diff --git a/src/emap/parse.c b/src/emap/parse.c
index 226bf9c..7e45c5a 100644
--- a/src/emap/parse.c
+++ b/src/emap/parse.c
@@ -43,7 +43,7 @@ void map_parse_join_channel(int fd)
if (!sd)
return;
- safestrncpy(name, (char*)RFIFOP(fd, 2), 24);
+ safestrncpy(name, RFIFOP(fd, 2), 24);
if (name[0] == '#')
p = name + 1;
else
@@ -73,7 +73,7 @@ void map_parse_part_channel(int fd)
if (!sd)
return;
- safestrncpy(name, (char*)RFIFOP(fd, 2), 24);
+ safestrncpy(name, RFIFOP(fd, 2), 24);
if (name[0] == '#')
p = name + 1;
else
@@ -120,7 +120,7 @@ void map_parse_pet_say(int fd)
const int len = RFIFOW(fd, 2);
if (len > 500 || len < 6)
return;
- safestrncpy(message, (char*)RFIFOP(fd, 4), len - 4);
+ safestrncpy(message, RFIFOP(fd, 4), len - 4);
send_slave_say(sd, &sd->pd->bl, sd->pd->pet.name, message);
}
@@ -184,7 +184,7 @@ void map_parse_homun_say(int fd)
const int len = RFIFOW(fd, 2);
if (len > 500 || len < 6)
return;
- safestrncpy(message, (char*)RFIFOP(fd, 4), len - 4);
+ safestrncpy(message, RFIFOP(fd, 4), len - 4);
if (sd->md && sd->md->db)
send_slave_say(sd, &sd->md->bl, sd->md->db->name, message);
else if (sd->hd && homun_alive(sd->hd))
diff --git a/src/emap/script.c b/src/emap/script.c
index c60861d..e323e20 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -441,7 +441,7 @@ BUILDIN(restoreCam)
BUILDIN(npcTalk3)
{
- char *msg;
+ const char *msg;
getSD();
@@ -463,7 +463,7 @@ BUILDIN(npcTalk3)
}
if (sd)
- msg = (char*)lang_pctrans (nd->name, sd);
+ msg = lang_pctrans (nd->name, sd);
else
msg = nd->name;
diff --git a/src/emap/send.c b/src/emap/send.c
index 981d585..1c4f819 100644
--- a/src/emap/send.c
+++ b/src/emap/send.c
@@ -75,7 +75,7 @@ void send_local_message(int fd, struct block_list* bl, const char* msg)
WFIFOW (fd, 0) = 0x8d;
WFIFOW (fd, 2) = msg_len + 8;
WFIFOL (fd, 4) = bl->id;
- safestrncpy((char*)WFIFOP(fd, 8), msg, msg_len);
+ safestrncpy(WFIFOP(fd, 8), msg, msg_len);
WFIFOSET (fd, msg_len + 8);
}
@@ -279,7 +279,7 @@ void send_changemusic_brodcast(const int map, const char *music)
bl.m = map;
WBUFW (buf, 0) = 0xb05;
WBUFW (buf, 2) = sz;
- strcpy ((char *)WBUFP (buf, 4), music);
+ strcpy (WBUFP (buf, 4), music);
clif->send (buf, sz, &bl, ALL_SAMEMAP);
aFree(buf);
}
@@ -297,7 +297,7 @@ void send_changenpc_title (TBL_PC *sd, const int npcId, const char *name)
WFIFOW (fd, 2) = sz;
WFIFOL (fd, 4) = npcId;
WFIFOW (fd, 8) = len;
- strcpy ((char*)WFIFOP (fd, 10), name);
+ strcpy (WFIFOP (fd, 10), name);
WFIFOSET (fd, sz);
}
@@ -308,7 +308,7 @@ void send_join_ack(int fd, const char *const name, int flag)
WFIFOHEAD (fd, 27);
WFIFOW (fd, 0) = 0xb08;
- safestrncpy ((char*)WFIFOP (fd, 2), name, 24);
+ safestrncpy (WFIFOP (fd, 2), name, 24);
WFIFOB (fd, 26) = flag;
WFIFOSET (fd, 27);
}
@@ -409,7 +409,7 @@ void send_setwall(int m, int layer, int x1, int y1, int x2, int y2, int mask, en
WBUFW(buf, 8) = y2;
WBUFL(buf, 10) = mask;
WBUFL(buf, 14) = layer;
- mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name,(char*)WBUFP(buf, 18));
+ mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name, WBUFP(buf, 18));
struct block_list dummy_bl;
dummy_bl.type = BL_NUL;
@@ -450,6 +450,6 @@ void send_pc_skin(int fd, int npcId, const char *const skin)
WFIFOW(fd, 0) = 0xb1c;
WFIFOW(fd, 2) = sz;
WFIFOL(fd, 4) = npcId;
- strcpy((char*)WFIFOP (fd, 8), skin);
+ strcpy(WFIFOP (fd, 8), skin);
WFIFOSET(fd, sz);
}