[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]