diff options
author | Haru <haru@dotalux.com> | 2016-01-08 11:17:40 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-02-24 21:00:31 +0100 |
commit | 9ffd9cd568c5d908fbbec46256fe235021fd87a4 (patch) | |
tree | 284f2f47cbf2b5ef3d16dfb5cd8746f4b2a59dfd /src/map/battle.c | |
parent | 312f1b940e587a10b55fd544eaf4cc2197b1acd5 (diff) | |
download | hercules-9ffd9cd568c5d908fbbec46256fe235021fd87a4.tar.gz hercules-9ffd9cd568c5d908fbbec46256fe235021fd87a4.tar.bz2 hercules-9ffd9cd568c5d908fbbec46256fe235021fd87a4.tar.xz hercules-9ffd9cd568c5d908fbbec46256fe235021fd87a4.zip |
Removed unnecessary explicit casts of the value of WBUFP
- WBUFP now returns a pointer to void, which automatically casts to any
non-const or const pointer.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 4cf9a5b54..cb1541f66 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7379,19 +7379,19 @@ void Hercules_report(char* date, char *time_c) { WBUFW(buf,2) = 262 + ( bd_size * ( BFLAG_LENGTH + 4 ) ); WBUFW(buf,4) = 0x9f; - safestrncpy((char*)WBUFP(buf,6), date, 12); - safestrncpy((char*)WBUFP(buf,18), time_c, 9); - safestrncpy((char*)WBUFP(buf,27), timestring, 24); + safestrncpy(WBUFP(buf,6), date, 12); + safestrncpy(WBUFP(buf,18), time_c, 9); + safestrncpy(WBUFP(buf,27), timestring, 24); - safestrncpy((char*)WBUFP(buf,51), sysinfo->platform(), 16); - safestrncpy((char*)WBUFP(buf,67), sysinfo->osversion(), 50); - safestrncpy((char*)WBUFP(buf,117), sysinfo->cpu(), 32); + safestrncpy(WBUFP(buf,51), sysinfo->platform(), 16); + safestrncpy(WBUFP(buf,67), sysinfo->osversion(), 50); + safestrncpy(WBUFP(buf,117), sysinfo->cpu(), 32); WBUFL(buf,149) = sysinfo->cpucores(); - safestrncpy((char*)WBUFP(buf,153), sysinfo->arch(), 8); + safestrncpy(WBUFP(buf,153), sysinfo->arch(), 8); WBUFB(buf,161) = sysinfo->vcstypeid(); WBUFB(buf,162) = sysinfo->is64bit(); - safestrncpy((char*)WBUFP(buf,163), sysinfo->vcsrevision_src(), 41); - safestrncpy((char*)WBUFP(buf,204), sysinfo->vcsrevision_scripts(), 41); + safestrncpy(WBUFP(buf,163), sysinfo->vcsrevision_src(), 41); + safestrncpy(WBUFP(buf,204), sysinfo->vcsrevision_scripts(), 41); WBUFB(buf,245) = (sysinfo->is_superuser()? 1 : 0); WBUFL(buf,246) = map->getusers(); @@ -7400,7 +7400,7 @@ void Hercules_report(char* date, char *time_c) { WBUFL(buf,258) = bd_size; for( i = 0; i < bd_size; i++ ) { - safestrncpy((char*)WBUFP(buf,262 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, BFLAG_LENGTH); + safestrncpy(WBUFP(buf,262 + ( i * ( BFLAG_LENGTH + 4 ) ) ), battle_data[i].str, BFLAG_LENGTH); WBUFL(buf,262 + BFLAG_LENGTH + ( i * ( BFLAG_LENGTH + 4 ) ) ) = *battle_data[i].val; } |