提交 5ba01683 编写于 作者: P Peter Krempa

conf: Drop useless check when parsing cpu scheduler info

The checked predicate is a deduction from the following checks:

1) maximum cpu id is checked for every parsed <vcpusched> element
2) the resulting bitmaps are checked for overlaps
3) there has to be at least one cpu per <vcpusched>

From the above checks we can indeed deduce that if we have one
<vcpusched> element per CPU we will have at most 'maxvcpus' of them.

Drop the explicit check since it's redundant.
上级 668a0fef
......@@ -15224,12 +15224,6 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error;
}
if (n) {
if (n > def->maxvcpus) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("too many vcpusched nodes in cputune"));
goto error;
}
if (VIR_ALLOC_N(def->cputune.vcpusched, n) < 0)
goto error;
def->cputune.nvcpusched = n;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册