]> xenbits.xensource.com Git - libvirt.git/commitdiff
Rewrite the condition in qemuDomainAssignARMVirtioMMIOAddresses
authorJán Tomko <jtomko@redhat.com>
Tue, 3 May 2016 08:54:55 +0000 (10:54 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 3 May 2016 10:08:09 +0000 (12:08 +0200)
It was not indented correctly.

src/qemu/qemu_domain_address.c

index 25aab396755d5075151e01d57905da1f49191494..b3220a52634bb92d25d9742b1aa29f5bab2f85e2 100644 (file)
@@ -402,12 +402,16 @@ static void
 qemuDomainAssignARMVirtioMMIOAddresses(virDomainDefPtr def,
                                        virQEMUCapsPtr qemuCaps)
 {
-    if (((def->os.arch == VIR_ARCH_ARMV7L) ||
-        (def->os.arch == VIR_ARCH_AARCH64)) &&
-        (STRPREFIX(def->os.machine, "vexpress-") ||
-            STREQ(def->os.machine, "virt") ||
-            STRPREFIX(def->os.machine, "virt-")) &&
-        virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
+    if (def->os.arch != VIR_ARCH_ARMV7L &&
+        def->os.arch != VIR_ARCH_AARCH64)
+        return;
+
+    if (!(STRPREFIX(def->os.machine, "vexpress-") ||
+          STREQ(def->os.machine, "virt") ||
+          STRPREFIX(def->os.machine, "virt-")))
+        return;
+
+    if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_VIRTIO_MMIO)) {
         qemuDomainPrimeVirtioDeviceAddresses(
             def, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_VIRTIO_MMIO);
     }