Re: [chrony-dev] [PATCH] macOS 11.0 (Big Sur) beta - Bug in implementation of ntp_adjtime()

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Sun, Aug 30, 2020 at 09:49:22AM +1200, Bryan Christianson wrote:
> macOS 11.0 (Big Sur) beta incorrectly returns timex.freq as an unsigned number. This patch is a workaround for the bug and should be removed when Apple fix the problem (assuming they will). The patch also extends the ntpadjtime test to cover negative frequencies.
> ---
>  sys_timex.c              | 23 +++++++++++++++++++++--
>  test/kernel/ntpadjtime.c |  2 +-

Can you please split it into two patches, e.g. "test: extend
frequency in ntp_adjtime() test", and "sys_timex: add workaround for
broken ntp_adjtime() on macOS"?

> +static inline double
> +txc_freq(const struct timex *txc)

No need for the inline keyword (it's ok to rely on the compiler to
inline automatically when appropriate) and please find a bit more
descriptive name for the function, e.g. "convert_timex_frequency".

Thanks,

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/