cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Patch to use filename from Content-disposition header

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 11 Jan 2010 22:20:14 +0100

On Monday 11 of January 2010 22:08:25 Daniel Stenberg wrote:
> This is a mistake. As 'rv' is used to reture failure, we must make sure it
> isn't the same value as was given as input. Thus I instead suggest we make
> it:
>
> const size_t rv = (sz * nmemb) ? 0 : 1;

Good catch!

In fact I didn't think about why the code was here, only did sort of CSE
to have it at one place. I think it deserves a comment as well.

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-01-11