cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: isspace() usage in cookie.c

From: Daniel Stenberg <daniel-curl_at_haxx.se>
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.html
Received on 2004-09-23

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET