mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-03 04:45:46 +00:00
qemu: Remove return value checks from calls to virQEMUCapsNewCopy
The function now can't fail. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
459a7f1084
commit
b048218a8a
@ -6074,9 +6074,6 @@ virQEMUCapsCacheLookupCopy(virFileCache *cache,
|
|||||||
ret = virQEMUCapsNewCopy(qemuCaps);
|
ret = virQEMUCapsNewCopy(qemuCaps);
|
||||||
virObjectUnref(qemuCaps);
|
virObjectUnref(qemuCaps);
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
virQEMUCapsFilterByMachineType(ret, virtType, machineType);
|
virQEMUCapsFilterByMachineType(ret, virtType, machineType);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -150,8 +150,7 @@ testQemuCapsCopy(const void *opaque)
|
|||||||
virArchFromString(data->archName), capsFile)))
|
virArchFromString(data->archName), capsFile)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!(copy = virQEMUCapsNewCopy(orig)))
|
copy = virQEMUCapsNewCopy(orig);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!(actual = virQEMUCapsFormatCache(copy)))
|
if (!(actual = virQEMUCapsFormatCache(copy)))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -517,9 +517,7 @@ qemuTestCapsCacheInsertImpl(virFileCache *cache,
|
|||||||
if (qemu_emulators[arch]) {
|
if (qemu_emulators[arch]) {
|
||||||
/* if we are dealing with fake caps we need to populate machine types */
|
/* if we are dealing with fake caps we need to populate machine types */
|
||||||
if (!virQEMUCapsHasMachines(caps)) {
|
if (!virQEMUCapsHasMachines(caps)) {
|
||||||
if (!(copyCaps = effCaps = virQEMUCapsNewCopy(caps)))
|
copyCaps = effCaps = virQEMUCapsNewCopy(caps);
|
||||||
return -1;
|
|
||||||
|
|
||||||
qemuTestCapsPopulateFakeMachines(copyCaps, arch, hostOS);
|
qemuTestCapsPopulateFakeMachines(copyCaps, arch, hostOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,9 +539,6 @@ qemuTestCapsCacheInsertImpl(virFileCache *cache,
|
|||||||
else
|
else
|
||||||
tmp = virQEMUCapsNew();
|
tmp = virQEMUCapsNew();
|
||||||
|
|
||||||
if (!tmp)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
qemuTestCapsPopulateFakeMachines(tmp, i, hostOS);
|
qemuTestCapsPopulateFakeMachines(tmp, i, hostOS);
|
||||||
|
|
||||||
if (qemuTestCapsCacheInsertData(cache, qemu_emulators[i], tmp) < 0)
|
if (qemuTestCapsCacheInsertData(cache, qemu_emulators[i], tmp) < 0)
|
||||||
@ -1040,8 +1035,7 @@ testQemuInfoInitArgs(struct testQemuInfo *info)
|
|||||||
g_hash_table_insert(info->conf->capscache, g_strdup(capsfile), cachedcaps);
|
g_hash_table_insert(info->conf->capscache, g_strdup(capsfile), cachedcaps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(info->qemuCaps = virQEMUCapsNewCopy(cachedcaps)))
|
info->qemuCaps = virQEMUCapsNewCopy(cachedcaps);
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (info->args.fakeCapsUsed) {
|
if (info->args.fakeCapsUsed) {
|
||||||
size_t i;
|
size_t i;
|
||||||
|
Loading…
Reference in New Issue
Block a user