From f386e34d297adf8e515ff5a2d1a21bfad2cd4e9b Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sat, 4 May 2013 15:43:27 +0200 Subject: [PATCH] WUtil: Fixed wrong type recast The previous syntax used an explicit cast to remove the CONST attribute, but the right way is to keep the attribute and store the result in a variable which is defined properly. --- WINGs/string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WINGs/string.c b/WINGs/string.c index 8403d625..0fbead42 100644 --- a/WINGs/string.c +++ b/WINGs/string.c @@ -167,14 +167,14 @@ void wtokenfree(char **tokens, int count) char *wtrimspace(const char *s) { - char *t; + const char *t; if (s == NULL) return NULL; while (isspace(*s) && *s) s++; - t = (char *)s + strlen(s) - 1; + t = s + strlen(s) - 1; while (t > s && isspace(*t)) t--;