diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-22 19:04:18 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-09-23 09:44:35 +0200 |
commit | 527461285f54bca59356e2c550d55ed9606e96d1 (patch) | |
tree | fcddc2509c4de4c6ff2eaf8f8fe2359a59f37d6f /lib/vtls/mbedtls.c | |
parent | 96a3ab7bc8fcf731322e6d141f5eb8e4ad856e1a (diff) | |
download | curl-527461285f54bca59356e2c550d55ed9606e96d1.tar.gz |
vtls: fix narrowing conversion warnings
Curl_timeleft returns `timediff_t`, which is 64 bits wide also on
32-bit systems since commit b1616dad8f0.
Closes https://github.com/curl/curl/pull/4398
Diffstat (limited to 'lib/vtls/mbedtls.c')
-rw-r--r-- | lib/vtls/mbedtls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 63d1f4c81..27898505f 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -884,7 +884,7 @@ mbed_connect_common(struct connectdata *conn, struct Curl_easy *data = conn->data; struct ssl_connect_data *connssl = &conn->ssl[sockindex]; curl_socket_t sockfd = conn->sock[sockindex]; - long timeout_ms; + timediff_t timeout_ms; int what; /* check if the connection has already been established */ @@ -930,7 +930,7 @@ mbed_connect_common(struct connectdata *conn, connssl->connecting_state?sockfd:CURL_SOCKET_BAD; what = Curl_socket_check(readfd, CURL_SOCKET_BAD, writefd, - nonblocking ? 0 : timeout_ms); + nonblocking ? 0 : (time_t)timeout_ms); if(what < 0) { /* fatal error */ failf(data, "select/poll on SSL socket, errno: %d", SOCKERRNO); |