summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/time.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-11-14 11:42:03 -0500
committerDamjan Marion <dmarion@me.com>2018-11-15 17:22:25 +0000
commit96e2d4407b1538d8df4e277ba33b85876589e198 (patch)
treec2bf00143407fc2e8c07e9d779a4bcb5bd81d0dd /src/vppinfra/time.c
parentbdcff0327db0ad680906462cdf955d5ae5191c69 (diff)
VPP-1474: fix 2x coverity warnings
Change-Id: I441beaf3d7f57886580d7cce35ef592aa0fcca5f Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vppinfra/time.c')
-rw-r--r--src/vppinfra/time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vppinfra/time.c b/src/vppinfra/time.c
index 2bba1daba12..dee50024975 100644
--- a/src/vppinfra/time.c
+++ b/src/vppinfra/time.c
@@ -120,7 +120,7 @@ clock_frequency_from_proc_filesystem (void)
static f64
clock_frequency_from_sys_filesystem (void)
{
- f64 cpu_freq;
+ f64 cpu_freq = 0.0;
int fd;
unformat_input_t input;
@@ -131,7 +131,7 @@ clock_frequency_from_sys_filesystem (void)
goto done;
unformat_init_clib_file (&input, fd);
- unformat (&input, "%f", &cpu_freq);
+ (void) unformat (&input, "%f", &cpu_freq);
cpu_freq *= 1e3; /* measured in kHz */
unformat_free (&input);
close (fd);