]> granicus.if.org Git - curl/commit
timediff: return timediff_t from the time diff functions
authorDaniel Stenberg <daniel@haxx.se>
Mon, 23 Oct 2017 10:05:49 +0000 (12:05 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 25 Oct 2017 07:54:37 +0000 (09:54 +0200)
commitb9d25f9a6b3ca791385b80a6a3c3fa5ae113e1e0
treead56d8b7a703e96e9de0ef07bacab079b7169904
parent016c6a6abb525ffb9431a00a4eda6b70683f838e
timediff: return timediff_t from the time diff functions

... to cater for systems with unsigned time_t variables.

- Renamed the functions to curlx_timediff and Curl_timediff_us.

- Added overflow protection for both of them in either direction for
  both 32 bit and 64 bit time_ts

- Reprefixed the curlx_time functions to use Curl_*

Reported-by: Peter Piekarski
Fixes #2004
Closes #2005
22 files changed:
lib/asyn-ares.c
lib/asyn-thread.c
lib/connect.c
lib/easy.c
lib/ftp.c
lib/hostip.c
lib/multi.c
lib/pingpong.c
lib/progress.c
lib/rand.c
lib/select.c
lib/speedcheck.c
lib/telnet.c
lib/timeval.c
lib/timeval.h
lib/transfer.c
lib/url.c
lib/vtls/openssl.c
tests/server/Makefile.inc
tests/server/util.c
tests/server/util.h
tests/unit/unit1323.c