curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] curl: Fix compile warning on Fedora-14.

From: Ben Greear <greearb_at_candelatech.com>
Date: Mon, 18 Sep 2017 11:35:36 -0700

On 09/16/2017 02:52 PM, Daniel Stenberg wrote:
> On Mon, 11 Sep 2017, Ben Greear wrote:
>
>> This compiles w/out warnings on my Fedora-14 machine. I added braces and replaced the , with semi colons.
>
> What about this alternative take. Instead make the loop look like:
>
> for(i = 0; len; len--) {
> char c = *src++;
>
> if(c == '"' || c == '\\' || !c) {
> dst[i++] = '\\';
> if(!c)
> c = '0';
> }
> dst[i++] = c;
> }

This compiles fine on my Fedora-14 machine.

Thanks,
Ben

-- 
Ben Greear <greearb_at_candelatech.com>
Candela Technologies Inc  http://www.candelatech.com
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-09-18