From: Christophe CURIS <[email protected]>

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 8403d62..0fbead4 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--;
 
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to