cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: lib/transfer.c: checkhttpprefix() assignment of value to const parameter?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Tue, 22 May 2007 20:57:09 -0700

On Tue, May 22, 2007 at 11:31:22PM -0400, Andre Guibert de Bruet wrote:
> Maybe it's late and I should get some sleep, but it appears that in
> 7.16.2's lib/transfer.c:201, the assignment of s = scratch is invalid as s
> is a const char * parameter to the checkhttpprefix() function. This code
> is only in the CURL_DOES_CONVERSION case. What systems require/use this
> #define?

IBM mainframes using native EBCDIC encoding.

> I don't see how this source file would compile without errors on
> such a system.

It's a pointer to a constant char, not a constant pointer to a char. Since
s is more restrictive than scratch, it's a valid assignment.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-05-23