mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:43:31 +03:00
Curl_timeleft: change return type to timediff_t
returning 'time_t' is problematic when that type is unsigned and we return values less than zero to signal "already expired", used in several places in the code. Closes #2021
This commit is contained in:
parent
9dfc541dd7
commit
0d85eed3df
9 changed files with 19 additions and 18 deletions
|
|
@ -333,10 +333,10 @@ static CURLcode AcceptServerConnect(struct connectdata *conn)
|
|||
* Curl_pgrsTime(..., TIMER_STARTACCEPT);
|
||||
*
|
||||
*/
|
||||
static time_t ftp_timeleft_accept(struct Curl_easy *data)
|
||||
static timediff_t ftp_timeleft_accept(struct Curl_easy *data)
|
||||
{
|
||||
time_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT;
|
||||
time_t other;
|
||||
timediff_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT;
|
||||
timediff_t other;
|
||||
struct curltime now;
|
||||
|
||||
if(data->set.accepttimeout > 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue