diff options
author | Marc Hoersken <info@marc-hoersken.de> | 2020-05-05 21:39:39 +0200 |
---|---|---|
committer | Marc Hoersken <info@marc-hoersken.de> | 2020-05-30 10:20:40 +0200 |
commit | 4a8f459837e2b7dc146825fc9a864045f7d1ae4a (patch) | |
tree | a8d6295333f0c723a70dc355553d71ae74779a6b /lib/select.h | |
parent | 62314d6b71c0691aa9ab1f33f8b2ce869234aeee (diff) | |
download | curl-4a8f459837e2b7dc146825fc9a864045f7d1ae4a.tar.gz |
select: use timediff_t instead of time_t and int for timeout_ms
Make all functions in select.[ch] take timeout_ms as timediff_t
which should always be large enough and signed on all platforms
to take all possible timeout values and avoid type conversions.
Reviewed-by: Jay Satiro
Reviewed-by: Daniel Stenberg
Replaces #5107 and partially #5262
Related to #5240 and #5286
Closes #5343
Diffstat (limited to 'lib/select.h')
-rw-r--r-- | lib/select.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/select.h b/lib/select.h index 9b3e0783f..95181f467 100644 --- a/lib/select.h +++ b/lib/select.h @@ -76,7 +76,7 @@ int Curl_select(curl_socket_t maxfd, fd_set *fds_read, fd_set *fds_write, fd_set *fds_err, - time_t timeout_ms); + timediff_t timeout_ms); int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2, curl_socket_t writefd, @@ -86,8 +86,8 @@ int Curl_socket_check(curl_socket_t readfd, curl_socket_t readfd2, #define SOCKET_WRITABLE(x,z) \ Curl_socket_check(CURL_SOCKET_BAD, CURL_SOCKET_BAD, x, z) -int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); -int Curl_wait_ms(int timeout_ms); +int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms); +int Curl_wait_ms(timediff_t timeout_ms); #ifdef TPF int tpf_select_libcurl(int maxfds, fd_set* reads, fd_set* writes, |