From 18ae9b09c9c133c39dae97a4c1e93d7479ab0335 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 7 Dec 2015 10:40:18 -0700 Subject: [PATCH] t/genzip: cast division to double Signed-off-by: Jens Axboe --- t/genzipf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/genzipf.c b/t/genzipf.c index ff0729e5..d8253c3c 100644 --- a/t/genzipf.c +++ b/t/genzipf.c @@ -227,7 +227,7 @@ static void output_normal(struct node *nodes, unsigned long nnodes, if (percentage) { if (total_vals >= blocks) { - double cs = i * block_size / (1024 * 1024); + double cs = (double) i * block_size / (1024.0 * 1024.0); char p = 'M'; if (cs > 1024.0) { -- 2.25.1