[libvirt] [PATCH 3/6] util: perf: Adhere to coding style of error checks in virPerfEventEnable

Peter Krempa pkrempa at redhat.com
Wed Apr 27 13:32:31 UTC 2016


---
 src/util/virperf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virperf.c b/src/util/virperf.c
index 0ae4744..bd65587 100644
--- a/src/util/virperf.c
+++ b/src/util/virperf.c
@@ -186,7 +186,7 @@ virPerfEventEnable(virPerfPtr perf,

     switch (type) {
     case VIR_PERF_EVENT_CMT:
-        if (virPerfCmtEnable(event, pid))
+        if (virPerfCmtEnable(event, pid) < 0)
             return -1;
         break;
     case VIR_PERF_EVENT_LAST:
-- 
2.8.1




More information about the libvir-list mailing list