mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-07 22:34:18 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
32ecd4ee58
commit
f386e34d29
@@ -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--;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user