]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove useless os.machine NULL check
authorJán Tomko <jtomko@redhat.com>
Tue, 3 May 2016 10:29:26 +0000 (12:29 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 3 May 2016 10:29:26 +0000 (12:29 +0200)
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

index 53682c1bf32f0e4a6e5268525f9d56a63725631d..173f82c8183a368a44454edb2262ed72e8f9a086 100644 (file)
@@ -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;