I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- block/qcow2-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index f06c08f64c..30db942dde 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -61,7 +61,7 @@ int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size, new_l1_size = 1; } while (min_size > new_l1_size) { - new_l1_size = (new_l1_size * 3 + 1) / 2; + new_l1_size = DIV_ROUND_UP(new_l1_size * 3, 2); } } -- 2.13.1.395.gf7b71de06