Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx> --- tests/qemuxml2argvtest.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 393d2399fa..06a28178d0 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -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; \ -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list