]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: perf: Remove unnecessary 'error' label
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Apr 2016 07:54:45 +0000 (09:54 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 21 Apr 2016 07:57:02 +0000 (09:57 +0200)
The only place that uses it doesn't warrant a separate label.

tools/virsh-domain.c

index 4a73a80c2eb258332fc66509e22c706fa2fb97d5..a9f70dcdef6d7378c810fc7205c3cfac84b441a2 100644 (file)
@@ -8652,8 +8652,10 @@ cmdPerf(vshControl *ctl, const vshCmd *cmd)
             }
         }
     } else {
-        if (virDomainSetPerfEvents(dom, params, nparams, flags) != 0)
-            goto error;
+        if (virDomainSetPerfEvents(dom, params, nparams, flags) != 0) {
+            vshError(ctl, "%s", _("Unable to enable/disable perf events"));
+            goto cleanup;
+        }
     }
 
     ret = true;
@@ -8661,10 +8663,6 @@ cmdPerf(vshControl *ctl, const vshCmd *cmd)
     virTypedParamsFree(params, nparams);
     virDomainFree(dom);
     return ret;
-
- error:
-    vshError(ctl, "%s", _("Unable to enable/disable perf events"));
-    goto cleanup;
 }