lkml.org 
[lkml]   [2015]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] ntp:Fix second_overflow's input parameter type
From
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


\
 
 \ /
  Last update: 2015-12-16 07:41    [W:0.103 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site