Use the now-existing qcow2_opts pointer to simplify the size rounding up code.
Signed-off-by: Hanna Czenczek <hre...@redhat.com> --- block/qcow2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index b11cbfd859..988ebcf138 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -4064,8 +4064,7 @@ qcow2_co_create_opts(BlockDriver *drv, const char *filename, QemuOpts *opts, } /* Silently round up size */ - create_options->u.qcow2.size = ROUND_UP(create_options->u.qcow2.size, - BDRV_SECTOR_SIZE); + qcow2_opts->size = ROUND_UP(qcow2_opts->size, BDRV_SECTOR_SIZE); /* Create the qcow2 image (format layer) */ ret = qcow2_co_create(create_options, errp); -- 2.49.0