[PATCH] qemuMigrationSrcWaitForSpice: Remove return value

Peter Krempa posted 1 patch 1 year, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/2df9fe92b5f009c8593e358df98c241eb017792a.1660217611.git.pkrempa@redhat.com
src/qemu/qemu_migration.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
[PATCH] qemuMigrationSrcWaitForSpice: Remove return value
Posted by Peter Krempa 1 year, 8 months ago
The only caller doesn't check the return value and actually doesn't have
one either. Remove the return value and adjust return statements.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_migration.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 0b48852b9d..e28f738ebf 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1773,21 +1773,20 @@ qemuMigrationDstPostcopyFailed(virDomainObj *vm)
 }


-static int
+static void
 qemuMigrationSrcWaitForSpice(virDomainObj *vm)
 {
     qemuDomainObjPrivate *priv = vm->privateData;
     qemuDomainJobPrivate *jobPriv = priv->job.privateData;

     if (!jobPriv->spiceMigration)
-        return 0;
+        return;

     VIR_DEBUG("Waiting for SPICE to finish migration");
     while (!jobPriv->spiceMigrated && !priv->job.abortJob) {
         if (qemuDomainObjWait(vm) < 0)
-            return -1;
+            return;
     }
-    return 0;
 }


-- 
2.37.1
Re: [PATCH] qemuMigrationSrcWaitForSpice: Remove return value
Posted by Ján Tomko 1 year, 8 months ago
On a Thursday in 2022, Peter Krempa wrote:
>The only caller doesn't check the return value and actually doesn't have
>one either. Remove the return value and adjust return statements.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_migration.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano
Re: [PATCH] qemuMigrationSrcWaitForSpice: Remove return value
Posted by Erik Skultety 1 year, 8 months ago
On Thu, Aug 11, 2022 at 01:33:41PM +0200, Peter Krempa wrote:
> The only caller doesn't check the return value and actually doesn't have
> one either. Remove the return value and adjust return statements.
> 
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
> ---
Reviewed-by: Erik Skultety <eskultet@redhat.com>