From f2b157945f45ce78d35f17337cf2f64bacab4c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 3 May 2016 12:29:26 +0200 Subject: [PATCH] Remove useless os.machine NULL check In qemuDomainDefAddDefaultDevices we check for a non-NULL def->os.machine for x86 archs, but not the others. Moreover, the only caller - qemuDomainDefPostParse already checks for it and even then it can happen only if /etc/libvirt contains an XML without a machine type. --- src/qemu/qemu_domain.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 53682c1bf3..173f82c818 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1734,8 +1734,6 @@ qemuDomainDefAddDefaultDevices(virDomainDefPtr def, switch (def->os.arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: - if (!def->os.machine) - break; if (STREQ(def->os.machine, "isapc")) { addDefaultUSB = false; break;