From: Michal Privoznik Date: Fri, 29 May 2020 12:56:16 +0000 (+0200) Subject: qemuBuildMachineCommandLine: Drop needless check X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fe43b3a5a5532377f7de40e77ca9ffde5aa2ca7e;p=libvirt.git qemuBuildMachineCommandLine: Drop needless check The machine can not be NULL at this point - qemuDomainDefPostParse() makes sure it isn't. Signed-off-by: Michal Privoznik Reviewed-by: Daniel Henrique Barboza --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index b5a39e398d..2f0f1afe4c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -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);