Use 0 instead of DDIR_READ to iterate from 0 to DDIR_RWDIR_CNT
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index f1d468c783b558ec2acef34f87d41ba748824518..0bb21d0093ac05a4e71cda24cea5cfde25ee916b 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -2442,7 +2442,7 @@ static int add_bw_samples(struct thread_data *td, struct timeval *t)
        /*
         * Compute both read and write rates for the interval.
         */
        /*
         * Compute both read and write rates for the interval.
         */
-       for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
+       for (ddir = 0; ddir < DDIR_RWDIR_CNT; ddir++) {
                uint64_t delta;
 
                delta = td->this_io_bytes[ddir] - td->stat_io_bytes[ddir];
                uint64_t delta;
 
                delta = td->this_io_bytes[ddir] - td->stat_io_bytes[ddir];
@@ -2517,7 +2517,7 @@ static int add_iops_samples(struct thread_data *td, struct timeval *t)
        /*
         * Compute both read and write rates for the interval.
         */
        /*
         * Compute both read and write rates for the interval.
         */
-       for (ddir = DDIR_READ; ddir < DDIR_RWDIR_CNT; ddir++) {
+       for (ddir = 0; ddir < DDIR_RWDIR_CNT; ddir++) {
                uint64_t delta;
 
                delta = td->this_io_blocks[ddir] - td->stat_io_blocks[ddir];
                uint64_t delta;
 
                delta = td->this_io_blocks[ddir] - td->stat_io_blocks[ddir];