Messages in this thread | | | Date | Tue, 15 Dec 2015 22:12:32 -0800 | Subject | Re: [PATCH] ntp:Fix second_overflow's input parameter type | From | John Stultz <> |
| |
On Sat, Dec 12, 2015 at 8:26 PM, DengChao <chao.deng@linaro.org> wrote: > The function "second_overflow" uses "unsign long" > as its input parameter type which will overflow after > year 2106 on 32bit systems. > Replace it with time64_t type. > Because 64-bit division is expensive, since "next_ntp_leap_sec" > has been calculated already, we can just re-use it in the > TIME_INS/DEL cases instead of re-doing divsion which may occur > once a second. > Signed-off-by: DengChao <chao.deng@linaro.org>
Queued for testing. I reworded the commit message a bit too.
thanks -john
| |