提交 01c31852 编写于 作者: M Michal Privoznik

qemuBuildCommandLine: Change the condition for -nographics

There's this check when building command line that whenever
domain has no graphics card configured we put -nographics onto
qemu command line. The check is 'if (!def->graphics)'. This
makes coverity think that def->graphics can be NULL, which is
true. But later in the code every access to def->graphics is
guarded by check for def->ngraphics, so no crash occurs. But this
is something that coverity fails to deduct.
In order to shut coverity up lets change the condition to
'if (!def->ngraphics)'.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 e0392f5a
......@@ -7130,7 +7130,7 @@ qemuBuildCommandLine(virConnectPtr conn,
* if you ask for nographic. So we have to make sure we override
* these defaults ourselves...
*/
if (!def->graphics) {
if (!def->ngraphics) {
virCommandAddArg(cmd, "-nographic");
if (cfg->nogfxAllowHostAudio)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册