(__mktime_internal): If SEC_REQUESTED != SEC,
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Dec 2004 06:35:31 +0000 (06:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 3 Dec 2004 06:35:31 +0000 (06:35 +0000)
convert T2, not T.  (Imported from libc.)

lib/mktime.c

index b3d90824fa7d7963ff0a4204dc9cd97a84ca90ea..16f5b9a5a72b424f879ff32c6c11a0b3f0d2d594 100644 (file)
@@ -462,8 +462,9 @@ __mktime_internal (struct tm *tp,
       t2 = t1 + sec_adjustment;
       if (((t1 < t) != (sec_requested < 0))
          | ((t2 < t1) != (sec_adjustment < 0))
-         | ! (*convert) (&t, &tm))
+         | ! (*convert) (&t2, &tm))
        return -1;
+      t = t2;
     }
 
   *tp = tm;