[PATCH 4/6] util: perf: Adhere to coding style of error checks in qemuDomainSetPerfEvents

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

 



---
 src/qemu/qemu_driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 542d13c..0860822 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10070,9 +10070,9 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
             enabled = params->value.b;
             type = virPerfEventTypeFromString(param->field);

-            if (!enabled && virPerfEventDisable(priv->perf, type))
+            if (!enabled && virPerfEventDisable(priv->perf, type) < 0)
                 goto endjob;
-            if (enabled && virPerfEventEnable(priv->perf, type, vm->pid))
+            if (enabled && virPerfEventEnable(priv->perf, type, vm->pid) < 0)
                 goto endjob;

             def->perf->events[type] = enabled ?
-- 
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]