diff options
Diffstat (limited to 'time')
-rw-r--r-- | time/mktime.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/time/mktime.c b/time/mktime.c index dd7daaf948..f4d9cf1528 100644 --- a/time/mktime.c +++ b/time/mktime.c @@ -319,9 +319,7 @@ ranged_convert (struct tm *(*convert) (const time_t *, struct tm *), they differ by 1. */ while (bad != ok + (bad < 0 ? -1 : 1)) { - time_t mid = *t = (bad < 0 - ? bad + ((ok - bad) >> 1) - : ok + ((bad - ok) >> 1)); + time_t mid = *t = time_t_avg (ok, bad); r = convert (t, tp); if (r) ok = mid; |