aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2020-03-04 20:06:06 +0100
committerDave Barach <openvpp@barachs.net>2020-03-08 13:57:27 +0000
commitfa95842462af583d7e0842d02df0e2a19934c0fc (patch)
tree5f7438ecc820b348dff7c9fd9d3e133b210c54a8 /src/vppinfra
parent311817f77ec7505bf28b9c7a4d19e545547a1c74 (diff)
vppinfra: fix 32-bit overflow in os_cpu_clock_frequency
Type: fix Change-Id: I23250fcbc70086584b5448baec9af9a1528992f5 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra')
-rw-r--r--src/vppinfra/time.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/time.c b/src/vppinfra/time.c
index 27758dc7534..edeca1f9c2f 100644
--- a/src/vppinfra/time.c
+++ b/src/vppinfra/time.c
@@ -165,7 +165,7 @@ os_cpu_clock_frequency (void)
clib_get_cpuid (0x15, &eax, &ebx, &ecx, &edx);
if (ebx && ecx)
- return ecx * ebx / eax;
+ return (u64) ecx *ebx / eax;
if (max_leaf >= 0x16)
{