From: Harlan Stenn Date: Fri, 16 Sep 2016 08:26:08 +0000 (+0000) Subject: [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eab7aa28c9c86e3ce71e8acc8964828744bdd5aa;p=thirdparty%2Fntp.git [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. bk: 57dbaca0EMMjccOxmTaIB_eoWeYw4A --- diff --git a/ChangeLog b/ChangeLog index f4791a0d7..9f35c57af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ --- +* [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. * git author attribution cleanup * bk ignore file cleanup diff --git a/ntpd/ntp_loopfilter.c b/ntpd/ntp_loopfilter.c index 4b38aa8fd..c8320c480 100644 --- a/ntpd/ntp_loopfilter.c +++ b/ntpd/ntp_loopfilter.c @@ -701,9 +701,10 @@ local_clock( * where the FLL becomes effective. */ if (sys_poll >= allan_xpt) - clock_frequency += (fp_offset - - clock_offset) / max(ULOGTOD(sys_poll), - mu) * CLOCK_FLL; + clock_frequency += + (fp_offset - clock_offset) + / ( max(ULOGTOD(sys_poll), mu) + * CLOCK_FLL); /* * The PLL frequency gain (numerator) depends on @@ -713,8 +714,8 @@ local_clock( */ etemp = min(ULOGTOD(allan_xpt), mu); dtemp = 4 * CLOCK_PLL * ULOGTOD(sys_poll); - clock_frequency += fp_offset * etemp / (dtemp * - dtemp); + clock_frequency += + fp_offset * etemp / (dtemp * dtemp); } rstclock(EVNT_SYNC, fp_offset); if (fabs(fp_offset) < CLOCK_FLOOR)