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:
Jiri Denemark 2022-05-10 15:20:25 +02:00
parent 3abe9c496c
commit 6ca0ff90ac
3 changed files with 5 additions and 7 deletions

View 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

View 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,

View 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);