From 814917be52d33d09a6143a801955d7b75229e1b5 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 14 Apr 2014 12:20:04 -0600 Subject: [PATCH] gettime: init 'failed' before use Signed-off-by: Jens Axboe --- gettime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gettime.c b/gettime.c index d261e22e..fa750ec8 100644 --- a/gettime.c +++ b/gettime.c @@ -534,7 +534,7 @@ int fio_monotonic_clocktest(void) struct clock_thread *threads; unsigned int nr_cpus = cpus_online(); struct clock_entry *entries; - unsigned long tentries, failed; + unsigned long tentries, failed = 0; struct clock_entry *prev, *this; uint32_t seq = 0; unsigned int i; @@ -579,7 +579,7 @@ int fio_monotonic_clocktest(void) pthread_mutex_unlock(&t->lock); } - for (failed = i = 0; i < nr_cpus; i++) { + for (i = 0; i < nr_cpus; i++) { struct clock_thread *t = &threads[i]; void *ret; -- 2.25.1