提交 de31dcc8 编写于 作者: M Michal Privoznik

qemuBuildNumaArgStr: Discard def->cpu check

In the function at one place we check if def->cpu is NULL prior
to accessing def->cpu->ncells. Then, later in the code,
def->cpu->ncells is accessed directly, without the check. This
makes coverity unhappy, because the first check makes it think
def->cpu can be NULL. However, the function is not called if
def->cpu is NULL. Therefore, remove the first check and hopefully
make coverity cheer again.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 f8857c8f
...@@ -6594,7 +6594,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg, ...@@ -6594,7 +6594,7 @@ qemuBuildNumaArgStr(virQEMUDriverConfigPtr cfg,
continue; continue;
} }
if (def->cpu && def->cpu->ncells) { if (def->cpu->ncells) {
/* Fortunately, we allow only guest NUMA nodes to be continuous /* Fortunately, we allow only guest NUMA nodes to be continuous
* starting from zero. */ * starting from zero. */
pos = def->cpu->ncells - 1; pos = def->cpu->ncells - 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册