]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuBuildMachineCommandLine: Drop needless check
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 29 May 2020 12:56:16 +0000 (14:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 8 Jul 2020 10:05:24 +0000 (12:05 +0200)
The machine can not be NULL at this point -
qemuDomainDefPostParse() makes sure it isn't.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_command.c

index b5a39e398d3e616fc51f2807ae228bdf203a1f4d..2f0f1afe4c9527ebb083ca0261107242dfa4a6aa 100644 (file)
@@ -6723,13 +6723,6 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
     g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
     size_t i;
 
-    /* This should *never* be NULL, since we always provide
-     * a machine in the capabilities data for QEMU. So this
-     * check is just here as a safety in case the unexpected
-     * happens */
-    if (!def->os.machine)
-        return 0;
-
     virCommandAddArg(cmd, "-machine");
     virBufferAdd(&buf, def->os.machine, -1);