[PATCH 2/2] virsh: perf: Remove unnecessary 'error' label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The only place that uses it doesn't warrant a separate label.
---
 tools/virsh-domain.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 4a73a80..a9f70dc 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -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;
 }


-- 
2.8.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]