7548c0
From 4a3d416229ddf600ff985f9a90e3feb669548690 Mon Sep 17 00:00:00 2001
7548c0
Message-Id: <4a3d416229ddf600ff985f9a90e3feb669548690@dist-git>
7548c0
From: Michal Privoznik <mprivozn@redhat.com>
7548c0
Date: Wed, 7 Oct 2020 18:45:36 +0200
7548c0
Subject: [PATCH] qemuBuildMachineCommandLine: Drop needless check
7548c0
MIME-Version: 1.0
7548c0
Content-Type: text/plain; charset=UTF-8
7548c0
Content-Transfer-Encoding: 8bit
7548c0
7548c0
The machine can not be NULL at this point -
7548c0
qemuDomainDefPostParse() makes sure it isn't.
7548c0
7548c0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7548c0
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
7548c0
(cherry picked from commit fe43b3a5a5532377f7de40e77ca9ffde5aa2ca7e)
7548c0
7548c0
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518
7548c0
7548c0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7548c0
Message-Id: <4a0c05b78ac65e598b919acdb66d24a19fcf6251.1602087923.git.mprivozn@redhat.com>
7548c0
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7548c0
---
7548c0
 src/qemu/qemu_command.c | 7 -------
7548c0
 1 file changed, 7 deletions(-)
7548c0
7548c0
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
7548c0
index 8c4f7a015f..1a573c2817 100644
7548c0
--- a/src/qemu/qemu_command.c
7548c0
+++ b/src/qemu/qemu_command.c
7548c0
@@ -6977,13 +6977,6 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
7548c0
     g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
7548c0
     size_t i;
7548c0
 
7548c0
-    /* This should *never* be NULL, since we always provide
7548c0
-     * a machine in the capabilities data for QEMU. So this
7548c0
-     * check is just here as a safety in case the unexpected
7548c0
-     * happens */
7548c0
-    if (!def->os.machine)
7548c0
-        return 0;
7548c0
-
7548c0
     virCommandAddArg(cmd, "-machine");
7548c0
     virBufferAdd(&buf, def->os.machine, -1);
7548c0
 
7548c0
-- 
7548c0
2.29.2
7548c0