bfd: add missing cast

Add missing cast to time conversion function to to deal with arbitrary
clocks-per-second values.

Type: fix

Change-Id: I5075a823e7a95c972c513ac765252337d5f59fbf
Signed-off-by: Klement Sekera <ksekera@cisco.com>
This commit is contained in:
Klement Sekera
2020-01-29 22:59:48 +00:00
committed by Paul Vinciguerra
parent 31b1a6ce1d
commit 27d12d30cd

View File

@ -60,7 +60,7 @@ bfd_usec_to_clocks (const bfd_main_t * bm, u64 us)
u32
bfd_clocks_to_usec (const bfd_main_t * bm, u64 clocks)
{
return (clocks / bm->cpu_cps) * USEC_PER_SECOND;
return ((f64) clocks / bm->cpu_cps) * USEC_PER_SECOND;
}
static vlib_node_registration_t bfd_process_node;