]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: remove pointless label in testURIParse
authorJán Tomko <jtomko@redhat.com>
Wed, 22 Jun 2022 05:21:54 +0000 (07:21 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 22 Jun 2022 10:28:29 +0000 (12:28 +0200)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
tests/viruritest.c

index 7eb7c9cb675ec09fd879108ff09c0a09cbe97b1f..cd6ce57371faf3104e9811cf2058cb0833f3d208 100644 (file)
@@ -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;
 }