On 07/13/2017 11:31 AM, Marc-André Lureau wrote: > 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(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> > > 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); > } > } > > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature