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.
This commit is contained in:
Victor Stinner 2015-03-30 03:49:14 +02:00
parent bcdd777d3c
commit 869e1778c0
6 changed files with 22 additions and 18 deletions

View file

@ -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);