]> xenbits.xensource.com Git - libvirt.git/commit
qemuBuildCommandLine: Change the condition for -nographics
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Feb 2016 08:38:26 +0000 (09:38 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Feb 2016 14:48:37 +0000 (15:48 +0100)
commit01c318529804929c54f6817517cb044c7173f950
treeee1d31a035fdf0fce6f37b5e9d32271b1ce58852
parente0392f5a747dc771808086a3cc0f940b9287eaf5
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: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c