mirror of
https://github.com/curl/curl.git
synced 2026-08-25 08:03:34 +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
|
|
@ -57,7 +57,7 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
|
|||
ssize_t nread;
|
||||
ssize_t allread = 0;
|
||||
int result;
|
||||
time_t timeleft;
|
||||
timediff_t timeleft;
|
||||
*n = 0;
|
||||
for(;;) {
|
||||
timeleft = Curl_timeleft(conn->data, NULL, TRUE);
|
||||
|
|
@ -382,7 +382,7 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
|
|||
CURLcode code;
|
||||
curl_socket_t sock = conn->sock[sockindex];
|
||||
struct Curl_easy *data = conn->data;
|
||||
time_t timeout;
|
||||
timediff_t timeout;
|
||||
bool socks5_resolve_local =
|
||||
(conn->socks_proxy.proxytype == CURLPROXY_SOCKS5) ? TRUE : FALSE;
|
||||
const size_t hostname_len = strlen(hostname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue