qemu: Cleanup the unused 'nodeinfo'

"nodeinfo" is not used in these two functions, and it's waste
of goto in qemuProcessSetEmulatorAffinites
This commit is contained in:
Osier Yang 2012-10-19 12:09:20 +08:00
parent 2143ced7f5
commit 5828080f71

View File

@ -2004,14 +2004,9 @@ qemuProcessSetVcpuAffinites(virConnectPtr conn,
{
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainDefPtr def = vm->def;
virNodeInfo nodeinfo;
int vcpu, n;
int ret = -1;
if (virNodeGetInfo(conn, &nodeinfo) != 0) {
return -1;
}
if (!def->cputune.nvcpupin)
return 0;
@ -2042,23 +2037,16 @@ qemuProcessSetEmulatorAffinites(virConnectPtr conn,
{
virBitmapPtr cpumask;
virDomainDefPtr def = vm->def;
virNodeInfo nodeinfo;
int ret = -1;
if (virNodeGetInfo(conn, &nodeinfo) != 0)
return -1;
if (def->cputune.emulatorpin) {
if (def->cputune.emulatorpin)
cpumask = def->cputune.emulatorpin->cpumask;
} else if (def->cpumask) {
else if (def->cpumask)
cpumask = def->cpumask;
} else {
ret = 0;
goto cleanup;
}
else
return 0;
ret = virProcessInfoSetAffinity(vm->pid, cpumask);
cleanup:
return ret;
}