mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 06:25:19 +00:00
libvirt.c: remove unneeded cleanup label
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
93af79fba3
commit
e19f6cb7f2
@ -796,22 +796,19 @@ static int
|
|||||||
virConnectGetDefaultURI(virConfPtr conf,
|
virConnectGetDefaultURI(virConfPtr conf,
|
||||||
char **name)
|
char **name)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
|
||||||
const char *defname = getenv("LIBVIRT_DEFAULT_URI");
|
const char *defname = getenv("LIBVIRT_DEFAULT_URI");
|
||||||
if (defname && *defname) {
|
if (defname && *defname) {
|
||||||
VIR_DEBUG("Using LIBVIRT_DEFAULT_URI '%s'", defname);
|
VIR_DEBUG("Using LIBVIRT_DEFAULT_URI '%s'", defname);
|
||||||
*name = g_strdup(defname);
|
*name = g_strdup(defname);
|
||||||
} else {
|
} else {
|
||||||
if (virConfGetValueString(conf, "uri_default", name) < 0)
|
if (virConfGetValueString(conf, "uri_default", name) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
if (*name)
|
if (*name)
|
||||||
VIR_DEBUG("Using config file uri '%s'", *name);
|
VIR_DEBUG("Using config file uri '%s'", *name);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user