conf: Use local copy of maxvcpus in virDomainVcpuParse

Use the local variable rather than getting it all the time from the
struct. This will simplify further refactors.
This commit is contained in:
Peter Krempa 2015-10-19 14:01:22 +02:00
parent 4e187169f0
commit 310992c344

View File

@ -14407,13 +14407,13 @@ virDomainVcpuParse(virDomainDefPtr def,
goto cleanup;
}
def->vcpus = def->maxvcpus;
def->vcpus = maxvcpus;
}
if (def->maxvcpus < def->vcpus) {
if (maxvcpus < def->vcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("maxvcpus must not be less than current vcpus "
"(%u < %u)"), def->maxvcpus, def->vcpus);
"(%u < %u)"), maxvcpus, def->vcpus);
goto cleanup;
}