]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Removed unneeded check
authorPavel Fedin <p.fedin@samsung.com>
Wed, 9 Sep 2015 14:03:16 +0000 (17:03 +0300)
committerJán Tomko <jtomko@redhat.com>
Tue, 22 Sep 2015 11:56:59 +0000 (13:56 +0200)
Since test suite now correctly creates capabilities cache, the hack is not
needed any more.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c

index e4a88cd02fb79da4d6f53fff4eb4afd047077c81..2bc818e2f477be7667655cd3d8417adb252b2307 100644 (file)
@@ -1040,10 +1040,7 @@ qemuDomainDefPostParse(virDomainDefPtr def,
         return ret;
 
 
-    /* This condition is actually a (temporary) hack for test suite which
-     * does not create capabilities cache */
-    if (driver && driver->qemuCapsCache)
-        qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
+    qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
 
     /* Add implicit PCI root controller if the machine has one */
     switch (def->os.arch) {
@@ -1242,10 +1239,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
     if (driver)
         cfg = virQEMUDriverGetConfig(driver);
 
-    /* This condition is actually a (temporary) hack for test suite which
-     * does not create capabilities cache */
-    if (driver && driver->qemuCapsCache)
-        qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
+    qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, def->emulator);
 
     if (dev->type == VIR_DOMAIN_DEVICE_NET &&
         dev->data.net->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&