[libvirt PATCH 08/80] qemu: Make qemuDomainCleanupAdd return void

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

 



The function never returns anything but zero.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c    | 5 ++---
 src/qemu/qemu_domain.h    | 4 ++--
 src/qemu/qemu_migration.c | 3 +--
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 51236b19f2..7ad84f7080 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7436,7 +7436,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)
 {
@@ -7447,7 +7447,7 @@ qemuDomainCleanupAdd(virDomainObj *vm,
 
     for (i = 0; i < priv->ncleanupCallbacks; i++) {
         if (priv->cleanupCallbacks[i] == cb)
-            return 0;
+            return;
     }
 
     VIR_RESIZE_N(priv->cleanupCallbacks,
@@ -7455,7 +7455,6 @@ qemuDomainCleanupAdd(virDomainObj *vm,
                  priv->ncleanupCallbacks, 1);
 
     priv->cleanupCallbacks[priv->ncleanupCallbacks++] = cb;
-    return 0;
 }
 
 void
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index c7125722e0..3ea0426c7e 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -746,8 +746,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,
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 3e3203471a..19337878e4 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -3098,8 +3098,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);
-- 
2.35.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux