cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] CURL_LLONG_MAX: avoid constant overflow

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Sat, 29 May 2010 18:55:51 +0200

On Saturday 29 of May 2010 15:00:00 Jamie Lokier wrote:
> Kamil Dudka wrote:
> > Hello,
> >
> > the attached patch should eliminate the following warnings, which are
> > valid by the way:
> >
> > http://curl.haxx.se/auto/log.cgi?id=20100529052122-16675#prob1
>
> Then again, perhaps the patched code is wrong:
>
> +# define CURL_LLONG_MAX CURL_OFF_T_C(0x7FFFFFFF)
>
> That isn't the maximum value of "long long", which I guess is what
> CURL_LLONG_MAX means, since that's what LLONG_MAX means.

Nope, it's not. Just name of the define is pretty misleading. In fact it
stands for the maximum value of curl_off_t.

What about s/CURL_LLONG_/CURL_OFF_T_/ then? It should not break anything
as the define is purely internal...

Kamil
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-05-29