]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Make qemuDomainCleanupAdd return void
authorJiri Denemark <jdenemar@redhat.com>
Tue, 10 May 2022 13:20:25 +0000 (15:20 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Tue, 7 Jun 2022 15:40:20 +0000 (17:40 +0200)
The function never returns anything but zero.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_migration.c

index 124f5315c8379ea2feeff7f7ac81dd130fe85f17..6ad337d4a81b402a96642f28cf9e82db1b003133 100644 (file)
@@ -7475,7 +7475,7 @@ qemuDomainCheckDiskStartupPolicy(virQEMUDriver *driver,
  * The vm must be locked when any of the following cleanup functions is
  * called.
  */
-int
+void
 qemuDomainCleanupAdd(virDomainObj *vm,
                      qemuDomainCleanupCallback cb)
 {
@@ -7486,7 +7486,7 @@ qemuDomainCleanupAdd(virDomainObj *vm,
 
     for (i = 0; i < priv->ncleanupCallbacks; i++) {
         if (priv->cleanupCallbacks[i] == cb)
-            return 0;
+            return;
     }
 
     VIR_RESIZE_N(priv->cleanupCallbacks,
@@ -7494,7 +7494,6 @@ qemuDomainCleanupAdd(virDomainObj *vm,
                  priv->ncleanupCallbacks, 1);
 
     priv->cleanupCallbacks[priv->ncleanupCallbacks++] = cb;
-    return 0;
 }
 
 void
index 547d85b5f9330610f409b16d86dbf23d7f7cba79..ce2dba499c9593db9f908b61586a1aba275b19ae 100644 (file)
@@ -762,8 +762,8 @@ int qemuDomainPrepareStorageSourceBlockdev(virDomainDiskDef *disk,
                                            qemuDomainObjPrivate *priv,
                                            virQEMUDriverConfig *cfg);
 
-int qemuDomainCleanupAdd(virDomainObj *vm,
-                         qemuDomainCleanupCallback cb);
+void qemuDomainCleanupAdd(virDomainObj *vm,
+                          qemuDomainCleanupCallback cb);
 void qemuDomainCleanupRemove(virDomainObj *vm,
                              qemuDomainCleanupCallback cb);
 void qemuDomainCleanupRun(virQEMUDriver *driver,
index a6f45f0d1892b6e558f81a99d296cf761609f1d6..1cc8540083dbaad3cde24f8166e47db226cf0a6d 100644 (file)
@@ -3071,8 +3071,7 @@ qemuMigrationDstPrepareAny(virQEMUDriver *driver,
         VIR_WARN("Unable to encode migration cookie");
     }
 
-    if (qemuDomainCleanupAdd(vm, qemuMigrationDstPrepareCleanup) < 0)
-        goto stopjob;
+    qemuDomainCleanupAdd(vm, qemuMigrationDstPrepareCleanup);
 
     if (!(flags & VIR_MIGRATE_OFFLINE)) {
         virDomainAuditStart(vm, "migrated", true);