diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 01:49:14 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 01:49:14 (GMT) |
commit | 869e1778c0bcfc0928701c6ae0703934359d036b (patch) | |
tree | 231b2e09d453cca2ce5bf462ffb91f0f7303f3c0 /Modules/_ssl.c | |
parent | bcdd777d3c01a6db3b4357922663624ef617e65a (diff) | |
download | cpython-869e1778c0bcfc0928701c6ae0703934359d036b.zip cpython-869e1778c0bcfc0928701c6ae0703934359d036b.tar.gz cpython-869e1778c0bcfc0928701c6ae0703934359d036b.tar.bz2 |
Issue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING
All these functions only accept positive timeouts, so this change has no effect
in practice.
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 217c77c..3c909a6 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -1637,7 +1637,7 @@ check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing) /* s->sock_timeout is in seconds, timeout in ms */ timeout = (int)_PyTime_AsMilliseconds(s->sock_timeout, - _PyTime_ROUND_UP); + _PyTime_ROUND_CEILING); PySSL_BEGIN_ALLOW_THREADS rc = poll(&pollfd, 1, timeout); @@ -1651,7 +1651,7 @@ check_socket_and_wait_for_timeout(PySocketSockObject *s, int writing) if (!_PyIsSelectable_fd(s->sock_fd)) return SOCKET_TOO_LARGE_FOR_SELECT; - _PyTime_AsTimeval_noraise(s->sock_timeout, &tv, _PyTime_ROUND_UP); + _PyTime_AsTimeval_noraise(s->sock_timeout, &tv, _PyTime_ROUND_CEILING); FD_ZERO(&fds); FD_SET(s->sock_fd, &fds); |