The virshGetDBusDisplay() function is declared to return a
pointer and yet, in one error path false is returned. Switch the
statement to return NULL, which is what other error paths use to
indicate an error.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 58d5a4ab57..e69d14a6aa 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11908,7 +11908,7 @@ virshGetDBusDisplay(vshControl *ctl, xmlXPathContext *ctxt)
addr = virXPathString(xpath, ctxt);
if (!addr)
- return false;
+ return NULL;
if (STRPREFIX(addr, "unix:path=")) {
return g_strdup_printf("dbus+unix://%s", addr + 10);
--
2.43.0