]> granicus.if.org Git - python/commitdiff
Backout change 28d3bcb1bad6: "Try to fix _PyTime_AsTimevalStruct_impl() on
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Sep 2015 20:50:12 +0000 (22:50 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Sep 2015 20:50:12 +0000 (22:50 +0200)
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.

Python/pytime.c

index 53611b1ec15fd4e205262c10b0e2f59281b4773c..9889a3b53b0f90fd766d39506fb7a52ae44cf1ed 100644 (file)
@@ -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;