diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-29 00:08:03 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-30 23:10:57 +0200 |
commit | 842f73de58f38bd6e285e08bbd1adb6c17cb62cd (patch) | |
tree | c28cb0b85895d71f19373ab732736a5fa671ebff /lib/vtls/gskit.c | |
parent | fc55c723c4ecebabf12c32caddd0f9bc9d169ed4 (diff) |
timeouts: change millisecond timeouts to timediff_t from time_t
For millisecond timers we like timediff_t better. Also, time_t can be
unsigned so returning a negative value doesn't work then.
Closes #5479
Diffstat (limited to 'lib/vtls/gskit.c')
-rw-r--r-- | lib/vtls/gskit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/gskit.c b/lib/vtls/gskit.c index 4f29a2137..0538e4a46 100644 --- a/lib/vtls/gskit.c +++ b/lib/vtls/gskit.c @@ -819,7 +819,7 @@ static CURLcode gskit_connect_step1(struct connectdata *conn, int sockindex) if(!result) { /* Compute the handshake timeout. Since GSKit granularity is 1 second, we round up the required value. */ - long timeout = Curl_timeleft(data, NULL, TRUE); + timediff_t timeout = Curl_timeleft(data, NULL, TRUE); if(timeout < 0) result = CURLE_OPERATION_TIMEDOUT; else @@ -932,7 +932,7 @@ static CURLcode gskit_connect_step2(struct connectdata *conn, int sockindex, /* Poll or wait for end of SSL asynchronous handshake. */ for(;;) { - long timeout_ms = nonblocking? 0: Curl_timeleft(data, NULL, TRUE); + timediff_t timeout_ms = nonblocking? 0: Curl_timeleft(data, NULL, TRUE); if(timeout_ms < 0) timeout_ms = 0; stmv.tv_sec = timeout_ms / 1000; |