]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: cmdDomDisplay: Remove unneeded 'cleanup' label
authorPeter Krempa <pkrempa@redhat.com>
Mon, 28 Feb 2022 15:35:09 +0000 (16:35 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 3 Mar 2022 10:06:56 +0000 (11:06 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain.c

index f82aa497456974a19aa17932ce200cf4206650fd..7c06c3f80d22c396147eabfd50356856bc3d011d 100644 (file)
@@ -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;
 }