Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
fde7088
)
bfd: add missing cast
17/28217/1
author
Klement Sekera
<
[email protected]
>
Wed, 29 Jan 2020 22:59:48 +0000
(22:59 +0000)
committer
Andrew Yourtchenko
<
[email protected]
>
Fri, 7 Aug 2020 21:45:43 +0000
(21:45 +0000)
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 <
[email protected]
>
(cherry picked from commit
27d12d30cdf5af37fad0e14db0877ca716af2115
)
src/vnet/bfd/bfd_main.c
patch
|
blob
|
history
diff --git
a/src/vnet/bfd/bfd_main.c
b/src/vnet/bfd/bfd_main.c
index
ef6ada8
..
34e9804
100644
(file)
--- a/
src/vnet/bfd/bfd_main.c
+++ b/
src/vnet/bfd/bfd_main.c
@@
-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;