On Wed, Jun 22, 2022 at 07:35:33AM +0200, Ján Tomko wrote:
> Remove the label and use 'rc' instead of 'ret'.
> 
> Signed-off-by: Ján Tomko <jto...@redhat.com>
> ---
>  src/qemu/qemu_migration.c | 27 +++++++++++----------------
>  1 file changed, 11 insertions(+), 16 deletions(-)
> 
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 3d7d5efda3..0ed0066e27 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c

[...]

> @@ -2167,32 +2167,27 @@ qemuMigrationSrcGraphicsRelocate(virQEMUDriver 
> *driver,
>      /* QEMU doesn't support VNC relocation yet, so
>       * skip it to avoid generating an error
>       */
> -    if (type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE) {
> -        ret = 0;
> -        goto cleanup;
> -    }
> +    if (type != VIR_DOMAIN_GRAPHICS_TYPE_SPICE)
> +        return 0;
>  
>      /* Older libvirt sends port == 0 for listen type='none' graphics. It's
>       * safe to ignore such requests since relocation to unknown port does
>       * not make sense in general.
>       */
> -    if (port <= 0 && tlsPort <= 0) {
> -        ret = 0;
> -        goto cleanup;
> -    }
> +    if (port <= 0 && tlsPort <= 0)
> +        return 0;
>  
>      if (qemuDomainObjEnterMonitorAsync(driver, vm,
>                                         VIR_ASYNC_JOB_MIGRATION_OUT) == 0) {
>          qemuDomainJobPrivate *jobPriv = priv->job.privateData;
>  
> -        ret = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress,
> +        rc = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress,
>                                            port, tlsPort, tlsSubject);

Wrong indentation.

> -        jobPriv->spiceMigration = !ret;
> +        jobPriv->spiceMigration = !rc;
>          qemuDomainObjExitMonitor(vm);
>      }
>  
> - cleanup:
> -    return ret;
> +    return rc;
>  }
>  
>  
> -- 
> 2.34.1
> 

Attachment: signature.asc
Description: PGP signature

Reply via email to