mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
qemu: Make qemuDomainCleanupAdd return void
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>
This commit is contained in:
parent
3abe9c496c
commit
6ca0ff90ac
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user