Re: isspace() usage in cookie.c
Date: Thu, 23 Sep 2004 15:43:43 +0200 (CEST)
On Thu, 23 Sep 2004, Harshal Pradhan wrote:
> So, what is right solution in this particular case? And what kind of patch
> would be accepted upstream? I think we are not really concerned with locales
> etc. for this particular case and are only really looking for the classical
> ASCII whitespaces, right?
> I can shut it up by casting like so
> isspace((int)(unsigned char)what[len-1])
> or doing something like
> (what[len-1] > 0) && isspace((int)what[len-1])
> Or something else ..... Thoughts?
I think we should modify the 'char *' variables to become 'unsigned char *'
variables as then typecasting it to 'int' like we do won't produce any
negative values, which I assume is the actual problem you face?
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-09-23