diff options
author | Haru <haru@dotalux.com> | 2016-01-08 14:41:38 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-24 21:00:32 +0100 |
commit | 9ee166316cded9aad0ace7e13f43a406f0e5400c (patch) | |
tree | 7b73c9def37bf9e04d737b8d7549875482b60023 /src/char | |
parent | 4b873e6e6520e827aae689bf15dd6adac97473f7 (diff) | |
download | hercules-9ee166316cded9aad0ace7e13f43a406f0e5400c.tar.gz hercules-9ee166316cded9aad0ace7e13f43a406f0e5400c.tar.bz2 hercules-9ee166316cded9aad0ace7e13f43a406f0e5400c.tar.xz hercules-9ee166316cded9aad0ace7e13f43a406f0e5400c.zip |
Removed several unnecessary explicit casts of the WFIFOP result
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/char.c | 16 | ||||
-rw-r--r-- | src/char/int_homun.c | 2 | ||||
-rw-r--r-- | src/char/int_storage.c | 2 | ||||
-rw-r--r-- | src/char/inter.c | 8 | ||||
-rw-r--r-- | src/char/pincode.c | 2 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/char/char.c b/src/char/char.c index 63abeddab..6b12faa60 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2085,7 +2085,7 @@ void char_mmo_char_send_ban_list(int fd, struct char_session_data *sd) { for(i = 0, c = 0; i < MAX_CHARS; i++) { if( sd->unban_time[i] ) { - timestamp2string((char*)WFIFOP(fd,8 + (28*c)), 20, sd->unban_time[i], "%Y-%m-%d %H:%M:%S"); + timestamp2string(WFIFOP(fd,8 + (28*c)), 20, sd->unban_time[i], "%Y-%m-%d %H:%M:%S"); if( sd->unban_time[i] > now ) WFIFOL(fd, 4 + (24*c)) = sd->found_char[i]; @@ -2785,7 +2785,7 @@ void char_global_accreg_to_login_add (const char *key, unsigned int index, intpt WFIFOB(chr->login_fd, nlen) = (unsigned char)len;/* won't be higher; the column size is 32 */ nlen += 1; - safestrncpy((char*)WFIFOP(chr->login_fd,nlen), key, len); + safestrncpy(WFIFOP(chr->login_fd,nlen), key, len); nlen += len; WFIFOL(chr->login_fd, nlen) = index; @@ -2802,7 +2802,7 @@ void char_global_accreg_to_login_add (const char *key, unsigned int index, intpt WFIFOB(chr->login_fd, nlen) = (unsigned char)len;/* won't be higher; the column size is 254 */ nlen += 1; - safestrncpy((char*)WFIFOP(chr->login_fd,nlen), sval, len); + safestrncpy(WFIFOP(chr->login_fd,nlen), sval, len); nlen += len; } } else { @@ -3368,7 +3368,7 @@ void char_char_name_ack(int fd, int char_id) WFIFOHEAD(fd,30); WFIFOW(fd,0) = 0x2b09; WFIFOL(fd,2) = char_id; - chr->loadName(char_id, (char*)WFIFOP(fd,6)); + chr->loadName(char_id, WFIFOP(fd,6)); WFIFOSET(fd,30); } @@ -3457,7 +3457,7 @@ void char_ask_name_ack(int fd, int acc, const char* name, int type, int result) WFIFOHEAD(fd,34); WFIFOW(fd, 0) = 0x2b0f; WFIFOL(fd, 2) = acc; - safestrncpy((char*)WFIFOP(fd,6), name, NAME_LENGTH); + safestrncpy(WFIFOP(fd,6), name, NAME_LENGTH); WFIFOW(fd,30) = type; WFIFOW(fd,32) = result; WFIFOSET(fd,34); @@ -3855,7 +3855,7 @@ void char_parse_frommap_request_stats_report(int fd) WFIFOHEAD(sfd, RFIFOW(fd,2) ); - memcpy((char*)WFIFOP(sfd,0), RFIFOP(fd, 0), RFIFOW(fd,2)); + memcpy(WFIFOP(sfd,0), RFIFOP(fd, 0), RFIFOW(fd,2)); WFIFOSET(sfd, RFIFOW(fd,2) ); @@ -4512,7 +4512,7 @@ void char_send_map_info(int fd, int i, uint32 subnet_map_ip, struct mmo_charstat WFIFOHEAD(fd,28); WFIFOW(fd,0) = 0x71; WFIFOL(fd,2) = cd->char_id; - mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), (char*)WFIFOP(fd,6)); + mapindex->getmapname_ext(mapindex_id2name(cd->last_point.map), WFIFOP(fd,6)); WFIFOL(fd,22) = htonl((subnet_map_ip) ? subnet_map_ip : chr->server[i].ip); WFIFOW(fd,26) = sockt->ntows(htons(chr->server[i].port)); // [!] LE byte order here [!] WFIFOSET(fd,28); @@ -4523,7 +4523,7 @@ void char_send_wait_char_server(int fd) WFIFOHEAD(fd, 24); WFIFOW(fd, 0) = 0x840; WFIFOW(fd, 2) = 24; - safestrncpy((char*)WFIFOP(fd,4), "0", 20);/* we can't send empty (otherwise the list will pop up) */ + safestrncpy(WFIFOP(fd,4), "0", 20);/* we can't send empty (otherwise the list will pop up) */ WFIFOSET(fd, 24); } diff --git a/src/char/int_homun.c b/src/char/int_homun.c index 2179b2aa3..f084b9709 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -105,7 +105,7 @@ void mapif_homunculus_renamed(int fd, int account_id, int char_id, unsigned char WFIFOL(fd, 2) = account_id; WFIFOL(fd, 6) = char_id; WFIFOB(fd,10) = flag; - safestrncpy((char*)WFIFOP(fd,11), name, NAME_LENGTH); + safestrncpy(WFIFOP(fd,11), name, NAME_LENGTH); WFIFOSET(fd, NAME_LENGTH+12); } diff --git a/src/char/int_storage.c b/src/char/int_storage.c index b41e6382d..705aa02d2 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -195,7 +195,7 @@ int mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) WFIFOL(fd,4) = account_id; WFIFOL(fd,8) = guild_id; WFIFOB(fd,12) = flag; //1 open storage, 0 don't open - inter_storage->guild_storage_fromsql(guild_id, (struct guild_storage*)WFIFOP(fd,13)); + inter_storage->guild_storage_fromsql(guild_id, WFIFOP(fd,13)); WFIFOSET(fd, WFIFOW(fd,2)); return 0; } diff --git a/src/char/inter.c b/src/char/inter.c index 1e122ec08..4ef94efdf 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -413,7 +413,7 @@ void inter_vmsg_to_fd(int fd, int u_fd, int aid, char* msg, va_list ap) WFIFOW(fd,2) = 12 + (unsigned short)len; WFIFOL(fd,4) = u_fd; WFIFOL(fd,8) = aid; - safestrncpy((char*)WFIFOP(fd,12), msg_out, len); + safestrncpy(WFIFOP(fd,12), msg_out, len); WFIFOSET(fd,12 + len); @@ -665,7 +665,7 @@ int inter_accreg_fromsql(int account_id,int char_id, int fd, int type) WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 32 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; SQL->GetData(inter->sql_handle, 1, &data, NULL); @@ -679,7 +679,7 @@ int inter_accreg_fromsql(int account_id,int char_id, int fd, int type) WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 254 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; WFIFOW(fd, 14) += 1; @@ -746,7 +746,7 @@ int inter_accreg_fromsql(int account_id,int char_id, int fd, int type) WFIFOB(fd, plen) = (unsigned char)len;/* won't be higher; the column size is 32 */ plen += 1; - safestrncpy((char*)WFIFOP(fd,plen), data, len); + safestrncpy(WFIFOP(fd,plen), data, len); plen += len; SQL->GetData(inter->sql_handle, 1, &data, NULL); diff --git a/src/char/pincode.c b/src/char/pincode.c index 83509576a..6930a7a57 100644 --- a/src/char/pincode.c +++ b/src/char/pincode.c @@ -144,7 +144,7 @@ void pincode_notifyLoginPinUpdate(int account_id, char* pin) { WFIFOHEAD(chr->login_fd,11); WFIFOW(chr->login_fd,0) = 0x2738; WFIFOL(chr->login_fd,2) = account_id; - safestrncpy( (char*)WFIFOP(chr->login_fd,6), pin, 5 ); + safestrncpy(WFIFOP(chr->login_fd,6), pin, 5); WFIFOSET(chr->login_fd,11); } |