[PATCH 12/23] virsh: cmdDomDisplay: Remove unneeded 'cleanup' label

Peter Krempa pkrempa at redhat.com
Wed Mar 2 13:55:11 UTC 2022


Signed-off-by: Peter Krempa <pkrempa at redhat.com>
---
 tools/virsh-domain.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index f82aa49745..7c06c3f80d 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -11864,17 +11864,17 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)

     if (!virDomainIsActive(dom)) {
         vshError(ctl, _("Domain is not running"));
-        goto cleanup;
+        return false;
     }

     if (vshCommandOptBool(cmd, "include-password"))
         flags |= VIR_DOMAIN_XML_SECURE;

     if (vshCommandOptStringReq(ctl, cmd, "type", &type) < 0)
-        goto cleanup;
+        return false;

     if (virshDomainGetXMLFromDom(ctl, dom, flags, &xml, &ctxt) < 0)
-        goto cleanup;
+        return false;

     /* Attempt to grab our display info */
     for (iter = 0; scheme[iter] != NULL; iter++) {
@@ -11903,7 +11903,6 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
             vshError(ctl, _("No graphical display found"));
     }

- cleanup:
     return ret;
 }

-- 
2.35.1




More information about the libvir-list mailing list