static int testURIParse(const void *args)
{
- int ret = -1;
g_autoptr(virURI) uri = NULL;
const struct URIParseData *data = args;
g_autofree char *uristr = NULL;
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'",
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'",
}
if (fail)
- goto cleanup;
+ return -1;
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}