Signed-off-by: Daniel Henrique Barboza <danielhb413(a)gmail.com>
---
src/libvirt.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 33b43305a1..9d783761e6 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -796,22 +796,19 @@ static int
virConnectGetDefaultURI(virConfPtr conf,
char **name)
{
- int ret = -1;
const char *defname = getenv("LIBVIRT_DEFAULT_URI");
if (defname && *defname) {
VIR_DEBUG("Using LIBVIRT_DEFAULT_URI '%s'", defname);
*name = g_strdup(defname);
} else {
if (virConfGetValueString(conf, "uri_default", name) < 0)
- goto cleanup;
+ return -1;
if (*name)
VIR_DEBUG("Using config file uri '%s'", *name);
}
- ret = 0;
- cleanup:
- return ret;
+ return 0;
}
--
2.21.0