X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=stat.c;h=5b49dddbb1d0786341902bd4a2b75271db30f466;hp=1effbfe9c5b452c625574a3cce02bd87ccdb074a;hb=a43f4461d5716c4c46018dd45cecf0a896d05dbd;hpb=94a78d52c83ab998d0b4614e472338ab959bb224 diff --git a/stat.c b/stat.c index 1effbfe9..5b49dddb 100644 --- a/stat.c +++ b/stat.c @@ -1398,7 +1398,7 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts, if (ts->ss_dur) { struct json_object *data; struct json_array *iops, *bw; - int i, j, k; + int j, k, l; char ss_buf[64]; snprintf(ss_buf, sizeof(ss_buf), "%s%s:%f%s", @@ -1434,8 +1434,8 @@ static struct json_object *show_thread_status_json(struct thread_stat *ts, j = ts->ss_head; else j = ts->ss_head == 0 ? ts->ss_dur - 1 : ts->ss_head - 1; - for (i = 0; i < ts->ss_dur; i++) { - k = (j + i) % ts->ss_dur; + for (l = 0; l < ts->ss_dur; l++) { + k = (j + l) % ts->ss_dur; json_array_add_value_int(bw, ts->ss_bw_data[k]); json_array_add_value_int(iops, ts->ss_iops_data[k]); }