mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-07-31 14:07:16 +00:00
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:
parent
4e187169f0
commit
310992c344
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user