mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 22:45:07 -05:00
Rename round() function to avoid clash with builtin
This commit is contained in:
@@ -98,7 +98,7 @@ static void handle_end_of_slew(void *anything);
|
|||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
||||||
inline static int
|
inline static int
|
||||||
round(double x) {
|
our_round(double x) {
|
||||||
int y;
|
int y;
|
||||||
y = (int)(x + 0.5);
|
y = (int)(x + 0.5);
|
||||||
while ((double)y < x - 0.5) y++;
|
while ((double)y < x - 0.5) y++;
|
||||||
@@ -433,7 +433,7 @@ set_frequency(double freq_ppm) {
|
|||||||
neg = 0;
|
neg = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
required_delta_tick = round(freq_ppm / dhz);
|
required_delta_tick = our_round(freq_ppm / dhz);
|
||||||
required_freq = freq_ppm - dhz * (double) required_delta_tick;
|
required_freq = freq_ppm - dhz * (double) required_delta_tick;
|
||||||
|
|
||||||
if (neg) {
|
if (neg) {
|
||||||
|
|||||||
Reference in New Issue
Block a user