ret = virQEMUCapsNewCopy(qemuCaps);
virObjectUnref(qemuCaps);
- if (!ret)
- return NULL;
-
virQEMUCapsFilterByMachineType(ret, virtType, machineType);
return ret;
}
virArchFromString(data->archName), capsFile)))
return -1;
- if (!(copy = virQEMUCapsNewCopy(orig)))
- return -1;
+ copy = virQEMUCapsNewCopy(orig);
if (!(actual = virQEMUCapsFormatCache(copy)))
return -1;
if (qemu_emulators[arch]) {
/* if we are dealing with fake caps we need to populate machine types */
if (!virQEMUCapsHasMachines(caps)) {
- if (!(copyCaps = effCaps = virQEMUCapsNewCopy(caps)))
- return -1;
-
+ copyCaps = effCaps = virQEMUCapsNewCopy(caps);
qemuTestCapsPopulateFakeMachines(copyCaps, arch, hostOS);
}
else
tmp = virQEMUCapsNew();
- if (!tmp)
- return -1;
-
qemuTestCapsPopulateFakeMachines(tmp, i, hostOS);
if (qemuTestCapsCacheInsertData(cache, qemu_emulators[i], tmp) < 0)
g_hash_table_insert(info->conf->capscache, g_strdup(capsfile), cachedcaps);
}
- if (!(info->qemuCaps = virQEMUCapsNewCopy(cachedcaps)))
- return -1;
+ info->qemuCaps = virQEMUCapsNewCopy(cachedcaps);
if (info->args.fakeCapsUsed) {
size_t i;