[libvirt] [PATCH 2/3] qemu: driver: Remove unnecessary cleanup label from qemuDomainChangeDiskLive

Michal Privoznik mprivozn at redhat.com
Wed May 25 11:02:26 UTC 2016


On 25.05.2016 07:48, Peter Krempa wrote:
> ---
>  src/qemu/qemu_driver.c | 19 ++++++++-----------
>  1 file changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 895e926..6f5712d 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -7655,13 +7655,12 @@ qemuDomainChangeDiskLive(virConnectPtr conn,
>  {
>      virDomainDiskDefPtr disk = dev->data.disk;
>      virDomainDiskDefPtr orig_disk = NULL;
> -    int ret = -1;
> 
>      if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
> -        goto cleanup;
> +        return -1;

There's nothing technically wrong with this patch. But the thing is, I
like it this way. I think it's more future-proof. For instance, if we
ever alloc something here, or we want to return a different value or
something.

Michal




More information about the libvir-list mailing list