curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] timeval.c: Use long constant type for 64 bit timeval

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 3 Jul 2017 12:40:00 +0200 (CEST)

On Mon, 3 Jul 2017, Martin Kepplinger wrote:

> + if(diff >= (0x7fffffffffffffffUL/1000000))
> + return 0x7fffffffffffffffUL;

Thanks. I'm concerned that there are also 32 bit platforms with larger time_t
types (using long long) so UL won't be enough to cover them all.

Also, 'time_t' is usually a signed value IIRC, so shouldn't that rather use
just 'L' or 'LL' ?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-07-03