summaryrefslogtreecommitdiffstats
path: root/Python/pytime.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-09-30 20:50:12 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-09-30 20:50:12 (GMT)
commitc29f399e7e59c6e3d369568af784958321c151ac (patch)
treebe4635a73b885e7606a7fa07b5d6a09a867cbabf /Python/pytime.c
parentc51d244fc922610ee58e30dbd99d8d42f32d061b (diff)
downloadcpython-c29f399e7e59c6e3d369568af784958321c151ac.zip
cpython-c29f399e7e59c6e3d369568af784958321c151ac.tar.gz
cpython-c29f399e7e59c6e3d369568af784958321c151ac.tar.bz2
Backout change 28d3bcb1bad6: "Try to fix _PyTime_AsTimevalStruct_impl() on
OpenBSD", I'm not sure that the change was really needed. I read the test result of an old build because the OpenBSD was 100 builds late.
Diffstat (limited to 'Python/pytime.c')
-rw-r--r--Python/pytime.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Python/pytime.c b/Python/pytime.c
index 53611b1..9889a3b 100644
--- a/Python/pytime.c
+++ b/Python/pytime.c
@@ -454,7 +454,7 @@ static int
_PyTime_AsTimevalStruct_impl(_PyTime_t t, struct timeval *tv,
_PyTime_round_t round, int raise)
{
- _PyTime_t secs, secs2;
+ _PyTime_t secs;
int us;
int res;
@@ -467,8 +467,7 @@ _PyTime_AsTimevalStruct_impl(_PyTime_t t, struct timeval *tv,
#endif
tv->tv_usec = us;
- secs2 = (_PyTime_t)tv->tv_sec;
- if (res < 0 || secs2 != secs) {
+ if (res < 0 || (_PyTime_t)tv->tv_sec != secs) {
if (raise)
error_time_t_overflow();
return -1;