@@ -378,25 +378,6 @@ testAddCPUModels(virQEMUCapsPtr caps, bool skipLegacy)
}
-static int
-testInitQEMUCaps(struct testInfo *info,
- int gic)
-{
- int ret = -1;
-
- if (!(info->qemuCaps = virQEMUCapsNew()))
- goto cleanup;
-
- if (testQemuCapsSetGIC(info->qemuCaps, gic) < 0)
- goto cleanup;
-
- ret = 0;
-
- cleanup:
- return ret;
-}
-
-
static int
testUpdateQEMUCaps(const struct testInfo *info,
virDomainObjPtr vm,
@@ -840,7 +821,9 @@ mymain(void)
static struct testInfo info = { \
name, NULL, NULL, migrateFrom, migrateFd, (flags), parseFlags, \
}; \
- if (testInitQEMUCaps(&info, gic) < 0) \
+ if (!(info.qemuCaps = virQEMUCapsNew())) \
+ return EXIT_FAILURE; \
+ if (testQemuCapsSetGIC(info.qemuCaps, gic) < 0) \
return EXIT_FAILURE; \
if (testInfoSetArgs(&info, __VA_ARGS__, QEMU_CAPS_LAST, ARG_END) < 0) \
return EXIT_FAILURE; \
Signed-off-by: Cole Robinson <crobinso@redhat.com> --- tests/qemuxml2argvtest.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) -- 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list