From 28337e94858e2f5e6a46fa9ee205505c5f148e77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Wed, 22 Jun 2022 07:21:54 +0200 Subject: [PATCH] tests: remove pointless label in testURIParse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Pavel Hrdina --- tests/viruritest.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/viruritest.c b/tests/viruritest.c index 7eb7c9cb67..cd6ce57371 100644 --- a/tests/viruritest.c +++ b/tests/viruritest.c @@ -45,7 +45,6 @@ struct URIParseData { static int testURIParse(const void *args) { - int ret = -1; g_autoptr(virURI) uri = NULL; const struct URIParseData *data = args; g_autofree char *uristr = NULL; @@ -53,7 +52,7 @@ static int testURIParse(const void *args) bool fail = false; if (!(uri = virURIParse(data->uri))) - goto cleanup; + return -1; if (STRNEQ(uri->scheme, data->scheme)) { VIR_TEST_DEBUG("Expected scheme '%s', actual '%s'", @@ -120,7 +119,7 @@ static int testURIParse(const void *args) uri->query = virURIFormatParams(uri); if (!(uristr = virURIFormat(uri))) - goto cleanup; + return -1; if (STRNEQ(uristr, data->uri_out)) { VIR_TEST_DEBUG("URI did not roundtrip, expect '%s', actual '%s'", @@ -129,11 +128,9 @@ static int testURIParse(const void *args) } if (fail) - goto cleanup; + return -1; - ret = 0; - cleanup: - return ret; + return 0; }