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>
* The vm must be locked when any of the following cleanup functions is
* called.
*/
-int
+void
qemuDomainCleanupAdd(virDomainObj *vm,
qemuDomainCleanupCallback cb)
{
for (i = 0; i < priv->ncleanupCallbacks; i++) {
if (priv->cleanupCallbacks[i] == cb)
- return 0;
+ return;
}
VIR_RESIZE_N(priv->cleanupCallbacks,
priv->ncleanupCallbacks, 1);
priv->cleanupCallbacks[priv->ncleanupCallbacks++] = cb;
- return 0;
}
void
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,
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);