From: Tim Wiederhake Date: Mon, 14 Sep 2020 08:01:48 +0000 (+0200) Subject: tests: Fix false positive in testConfRoundTrip X-Git-Tag: v6.8.0-rc1~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b53ce9fa7a387b7df6821aeade5a95bf0141ba5;p=thirdparty%2Flibvirt.git tests: Fix false positive in testConfRoundTrip testConfRoundTrip would return 0 (success) if virConfWriteMem succeeded and virTestCompareToFile failed. Signed-off-by: Tim Wiederhake Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- diff --git a/tests/virconftest.c b/tests/virconftest.c index ab29b5b712..cac3718495 100644 --- a/tests/virconftest.c +++ b/tests/virconftest.c @@ -51,8 +51,7 @@ static int testConfRoundTrip(const void *opaque) fprintf(stderr, "Failed to process %s\n", srcfile); goto cleanup; } - ret = virConfWriteMem(buffer, &len, conf); - if (ret < 0) { + if (virConfWriteMem(buffer, &len, conf) < 0) { fprintf(stderr, "Failed to serialize %s back\n", srcfile); goto cleanup; }