On 9/4/21 4:44 PM, Ján Tomko wrote:
Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx> --- tests/vmx2xmltest.c | 19 +++++++------------ tests/xml2vmxtest.c | 15 +++++---------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/tests/vmx2xmltest.c b/tests/vmx2xmltest.c index b7f232eb77..0974168cb4 100644 --- a/tests/vmx2xmltest.c +++ b/tests/vmx2xmltest.c @@ -68,7 +68,6 @@ testCapsInit(void) static int testCompareFiles(const char *vmx, const char *xml, bool should_fail_parse) { - int ret = -1; g_autofree char *vmxData = NULL; g_autofree char *formatted = NULL; g_autoptr(virDomainDef) def = NULL; @@ -79,31 +78,27 @@ testCompareFiles(const char *vmx, const char *xml, bool should_fail_parse) def = virVMXParseConfig(&ctx, xmlopt, caps, vmxData); if (should_fail_parse) { if (!def) - ret = 0; + return 0; else VIR_TEST_DEBUG("passed instead of expected failure"); - goto cleanup; + return -1;
The else there is unnecessary (pre-existing condition).