Re: [PATCH] ntp:Fix second_overflow's input parameter type

2015-12-15 Thread John Stultz
On Sat, Dec 12, 2015 at 8:26 PM, DengChao 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

Re: [PATCH] ntp:Fix second_overflow's input parameter type

2015-12-15 Thread John Stultz
On Sat, Dec 12, 2015 at 8:26 PM, DengChao 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

[PATCH] ntp:Fix second_overflow's input parameter type

2015-12-12 Thread DengChao
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

[PATCH] ntp:Fix second_overflow's input parameter type

2015-12-12 Thread DengChao
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

[PATCH] ntp:Fix second_overflow's input parameter type

2015-10-28 Thread DengChao
The function "second_overflow" uses "unsigned long" as its input parameter type which will overflow after year 2106 on 32bit systems. This patch replaces it with a time64_t type. Since "next_ntp_leap_sec" is already calculated, we can reuse it and avoid re-doing the division (which is now

[PATCH] ntp:Fix second_overflow's input parameter type

2015-10-28 Thread DengChao
The function "second_overflow" uses "unsigned long" as its input parameter type which will overflow after year 2106 on 32bit systems. This patch replaces it with a time64_t type. Since "next_ntp_leap_sec" is already calculated, we can reuse it and avoid re-doing the division (which is now