use round() for rounding

Replace casting of values incremented by +0.5/-0.5 with round().
This commit is contained in:
Miroslav Lichvar
2021-09-23 10:01:50 +02:00
parent 9600993c28
commit d0d9a3fa43
4 changed files with 4 additions and 22 deletions

View File

@@ -2604,7 +2604,7 @@ broadcast_timeout(void *arg)
int poll;
destination = ARR_GetElement(broadcasts, (long)arg);
poll = log(destination->interval) / log(2.0) + 0.5;
poll = round(log(destination->interval) / log(2.0));
UTI_ZeroNtp64(&orig_ts);
zero_local_timestamp(&recv_ts);