From 3188738be5ee78651e31c1340fac7fed81bbefb5 Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 7 Jan 2016 16:47:24 +0100 Subject: Removed several unnecessary RFIFOP typecasts - While this is arguable, those explicit typecasts are potentially dangerous/misleading (for example, a const specifier might get accidentally dropped without even generating a compiler warning, or a variable type might change during code changes, and any related warning would get silenced by the explicit typecast). - As a reminder Hercules is written in C, and not in C++ (and there's no such thing as "compiling in C++ mode" - they're two different languages.) As such, it is legal to let the compiler automatically promote void* from/to any non-const pointer type, as well as const void* from/to any const pointer type. Signed-off-by: Haru --- src/map/irc-bot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/irc-bot.c') diff --git a/src/map/irc-bot.c b/src/map/irc-bot.c index fa4216f18..c38d3064c 100644 --- a/src/map/irc-bot.c +++ b/src/map/irc-bot.c @@ -151,7 +151,7 @@ int irc_parse(int fd) { return 0; parse_string = aMalloc(RFIFOREST(fd)); - safestrncpy(parse_string, (char*)RFIFOP(fd,0), RFIFOREST(fd)); + safestrncpy(parse_string, RFIFOP(fd,0), RFIFOREST(fd)); RFIFOSKIP(fd, RFIFOREST(fd)); RFIFOFLUSH(fd); -- cgit v1.2.3-70-g09d2