stat: fix integer overflow in convert_agg_kbytes_percent
[fio.git] / stat.c
diff --git a/stat.c b/stat.c
index b7222f465f63a4c785ce080f523c89e2ec6c91f1..a8a96c85a4120b0d70dee939c9102fe340565aae 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -462,7 +462,7 @@ static double convert_agg_kbytes_percent(struct group_run_stats *rs, int ddir, i
 {
        double p_of_agg = 100.0;
        if (rs && rs->agg[ddir] > 1024) {
-               p_of_agg = mean * 100 / (double) (rs->agg[ddir] / 1024.0);
+               p_of_agg = mean * 100.0 / (double) (rs->agg[ddir] / 1024.0);
 
                if (p_of_agg > 100.0)
                        p_of_agg = 100.0;