From 4a3d416229ddf600ff985f9a90e3feb669548690 Mon Sep 17 00:00:00 2001 Message-Id: <4a3d416229ddf600ff985f9a90e3feb669548690@dist-git> From: Michal Privoznik Date: Wed, 7 Oct 2020 18:45:36 +0200 Subject: [PATCH] qemuBuildMachineCommandLine: Drop needless check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit fe43b3a5a5532377f7de40e77ca9ffde5aa2ca7e) Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518 Signed-off-by: Michal Privoznik Message-Id: <4a0c05b78ac65e598b919acdb66d24a19fcf6251.1602087923.git.mprivozn@redhat.com> Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8c4f7a015f..1a573c2817 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6977,13 +6977,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); -- 2.29.2