From de64df05bb69d38b7ecf548d9e15573b9010704a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Mar 2007 19:09:49 +0100 Subject: [PATCH] Use DDIR_WRITE symbolic value instead of a hard coded 2 Signed-off-by: Jens Axboe --- stat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stat.c b/stat.c index 3a154677..7b4b9d57 100644 --- a/stat.c +++ b/stat.c @@ -655,7 +655,7 @@ void show_run_stats(void) ts = &threadstats[i]; memset(ts, 0, sizeof(*ts)); - for (j = 0; j < 2; j++) { + for (j = 0; j <= DDIR_WRITE; j++) { ts->clat_stat[j].min_val = -1UL; ts->slat_stat[j].min_val = -1UL; ts->bw_stat[j].min_val = -1UL; @@ -690,7 +690,7 @@ void show_run_stats(void) ts->verror = td->verror; } - for (l = 0; l < 2; l++) { + for (l = 0; l <= DDIR_WRITE; l++) { sum_stat(&ts->clat_stat[l], &td->ts.clat_stat[l], idx); sum_stat(&ts->slat_stat[l], &td->ts.slat_stat[l], idx); sum_stat(&ts->bw_stat[l], &td->ts.bw_stat[l], idx); @@ -737,7 +737,7 @@ void show_run_stats(void) ts = &threadstats[i]; rs = &runstats[ts->groupid]; - for (j = 0; j < 2; j++) { + for (j = 0; j <= DDIR_WRITE; j++) { if (!ts->runtime[j]) continue; if (ts->runtime[j] < rs->min_run[j] || !rs->min_run[j]) -- 2.25.1