summaryrefslogtreecommitdiff
path: root/src/char/pincode.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-24 23:40:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-24 23:40:24 +0300
commitff314da1740080a6cf1920f5ab2583ec3c60e3d2 (patch)
tree629046feb2d98a8a8fe0bc9e3674b3952a529ecc /src/char/pincode.c
parent9ee06831aec11a8ffea77f3b5c81465579f993e9 (diff)
parent027dfa3a608bb2986f4c495f20afdeba4e2ad459 (diff)
downloadhercules-ff314da1740080a6cf1920f5ab2583ec3c60e3d2.tar.gz
hercules-ff314da1740080a6cf1920f5ab2583ec3c60e3d2.tar.bz2
hercules-ff314da1740080a6cf1920f5ab2583ec3c60e3d2.tar.xz
hercules-ff314da1740080a6cf1920f5ab2583ec3c60e3d2.zip
Merge pull request #1165 from HerculesWS/const_rfifo
Const correctness (and typecast removal) for [RW]{FIFO,BUF}[PBWLQ] functions
Diffstat (limited to 'src/char/pincode.c')
-rw-r--r--src/char/pincode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/char/pincode.c b/src/char/pincode.c
index 371442fac..6930a7a57 100644
--- a/src/char/pincode.c
+++ b/src/char/pincode.c
@@ -67,7 +67,7 @@ void pincode_check(int fd, struct char_session_data* sd) {
char pin[5] = "\0\0\0\0";
nullpo_retv(sd);
- safestrncpy(pin, (char*)RFIFOP(fd, 6), sizeof(pin));
+ safestrncpy(pin, RFIFOP(fd, 6), sizeof(pin));
pincode->decrypt(sd->pincode_seed, pin);
if( pincode->compare( fd, sd, pin ) ){
struct online_char_data* character;
@@ -96,12 +96,12 @@ void pincode_change(int fd, struct char_session_data* sd) {
char oldpin[5] = "\0\0\0\0", newpin[5] = "\0\0\0\0";
nullpo_retv(sd);
- safestrncpy(oldpin, (char*)RFIFOP(fd,6), sizeof(oldpin));
+ safestrncpy(oldpin, RFIFOP(fd,6), sizeof(oldpin));
pincode->decrypt(sd->pincode_seed,oldpin);
if( !pincode->compare( fd, sd, oldpin ) )
return;
- safestrncpy(newpin, (char*)RFIFOP(fd,10), sizeof(newpin));
+ safestrncpy(newpin, RFIFOP(fd,10), sizeof(newpin));
pincode->decrypt(sd->pincode_seed,newpin);
pincode->update( sd->account_id, newpin );
safestrncpy(sd->pincode, newpin, sizeof(sd->pincode));
@@ -112,7 +112,7 @@ void pincode_setnew(int fd, struct char_session_data* sd) {
char newpin[5] = "\0\0\0\0";
nullpo_retv(sd);
- safestrncpy(newpin, (char*)RFIFOP(fd,6), sizeof(newpin));
+ safestrncpy(newpin, RFIFOP(fd,6), sizeof(newpin));
pincode->decrypt(sd->pincode_seed,newpin);
pincode->update( sd->account_id, newpin );
safestrncpy(sd->pincode, newpin, sizeof(sd->pincode));
@@ -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);
}