提交 310992c3 编写于 作者: P Peter Krempa

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.
上级 4e187169
...@@ -14407,13 +14407,13 @@ virDomainVcpuParse(virDomainDefPtr def, ...@@ -14407,13 +14407,13 @@ virDomainVcpuParse(virDomainDefPtr def,
goto cleanup; goto cleanup;
} }
def->vcpus = def->maxvcpus; def->vcpus = maxvcpus;
} }
if (def->maxvcpus < def->vcpus) { if (maxvcpus < def->vcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR, virReportError(VIR_ERR_INTERNAL_ERROR,
_("maxvcpus must not be less than current vcpus " _("maxvcpus must not be less than current vcpus "
"(%u < %u)"), def->maxvcpus, def->vcpus); "(%u < %u)"), maxvcpus, def->vcpus);
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册