mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
maint: clean up the unused variable 'caps' in src/qemu/qemu_*.c
Signed-off-by: Wang Rui <moon.wangrui@huawei.com>
This commit is contained in:
parent
0d60a03094
commit
6ee1c0ff67
@ -1864,7 +1864,6 @@ static int qemuDomainResume(virDomainPtr dom)
|
||||
virObjectEventPtr event = NULL;
|
||||
int state;
|
||||
virQEMUDriverConfigPtr cfg = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
|
||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||
return -1;
|
||||
@ -1901,8 +1900,6 @@ static int qemuDomainResume(virDomainPtr dom)
|
||||
VIR_DOMAIN_EVENT_RESUMED,
|
||||
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
|
||||
}
|
||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
||||
goto endjob;
|
||||
if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
|
||||
goto endjob;
|
||||
ret = 0;
|
||||
@ -1916,7 +1913,6 @@ static int qemuDomainResume(virDomainPtr dom)
|
||||
virObjectUnlock(vm);
|
||||
if (event)
|
||||
qemuDomainEventQueue(driver, event);
|
||||
virObjectUnref(caps);
|
||||
virObjectUnref(cfg);
|
||||
return ret;
|
||||
}
|
||||
@ -7108,7 +7104,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
|
||||
{
|
||||
virDomainDiskDefPtr disk = dev->data.disk;
|
||||
virDomainDiskDefPtr orig_disk = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
int ret = -1;
|
||||
|
||||
if (virStorageTranslateDiskSourcePool(conn, disk) < 0)
|
||||
@ -7129,9 +7124,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
||||
goto end;
|
||||
|
||||
/* Add the new disk src into shared disk hash table */
|
||||
if (qemuAddSharedDevice(driver, dev, vm->def->name) < 0)
|
||||
goto end;
|
||||
@ -7154,7 +7146,6 @@ qemuDomainChangeDiskMediaLive(virConnectPtr conn,
|
||||
}
|
||||
|
||||
end:
|
||||
virObjectUnref(caps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -758,7 +758,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
{
|
||||
virDomainDiskDefPtr disk = dev->data.disk;
|
||||
virDomainDiskDefPtr orig_disk = NULL;
|
||||
virCapsPtr caps = NULL;
|
||||
int ret = -1;
|
||||
const char *driverName = virDomainDiskGetDriver(disk);
|
||||
const char *src = virDomainDiskGetSource(disk);
|
||||
@ -796,9 +795,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
|
||||
goto end;
|
||||
|
||||
if (qemuDomainChangeEjectableMedia(driver, conn, vm, orig_disk,
|
||||
disk->src, false) < 0)
|
||||
goto end;
|
||||
@ -837,7 +833,6 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn,
|
||||
end:
|
||||
if (ret != 0)
|
||||
ignore_value(qemuRemoveSharedDevice(driver, dev, vm->def->name));
|
||||
virObjectUnref(caps);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user