mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-04 21:35:45 +00:00
tests: remove pointless label in testURIParse
Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
8d9bd178e2
commit
28337e9485
@ -45,7 +45,6 @@ struct URIParseData {
|
|||||||
|
|
||||||
static int testURIParse(const void *args)
|
static int testURIParse(const void *args)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
g_autoptr(virURI) uri = NULL;
|
g_autoptr(virURI) uri = NULL;
|
||||||
const struct URIParseData *data = args;
|
const struct URIParseData *data = args;
|
||||||
g_autofree char *uristr = NULL;
|
g_autofree char *uristr = NULL;
|
||||||
@ -53,7 +52,7 @@ static int testURIParse(const void *args)
|
|||||||
bool fail = false;
|
bool fail = false;
|
||||||
|
|
||||||
if (!(uri = virURIParse(data->uri)))
|
if (!(uri = virURIParse(data->uri)))
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (STRNEQ(uri->scheme, data->scheme)) {
|
if (STRNEQ(uri->scheme, data->scheme)) {
|
||||||
VIR_TEST_DEBUG("Expected scheme '%s', actual '%s'",
|
VIR_TEST_DEBUG("Expected scheme '%s', actual '%s'",
|
||||||
@ -120,7 +119,7 @@ static int testURIParse(const void *args)
|
|||||||
uri->query = virURIFormatParams(uri);
|
uri->query = virURIFormatParams(uri);
|
||||||
|
|
||||||
if (!(uristr = virURIFormat(uri)))
|
if (!(uristr = virURIFormat(uri)))
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (STRNEQ(uristr, data->uri_out)) {
|
if (STRNEQ(uristr, data->uri_out)) {
|
||||||
VIR_TEST_DEBUG("URI did not roundtrip, expect '%s', actual '%s'",
|
VIR_TEST_DEBUG("URI did not roundtrip, expect '%s', actual '%s'",
|
||||||
@ -129,11 +128,9 @@ static int testURIParse(const void *args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (fail)
|
if (fail)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user