[Libvirt-cim] [PATCH 04/10] CSI: Fix bug found during 'make distcheck'

John Ferlan jferlan at redhat.com
Thu Mar 14 22:55:56 UTC 2013


The 'ret' variable was set, but never checked. Caller never checks
returned status anyway.
---
 src/Virt_ComputerSystemIndication.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c
index 6b5cdd4..4c087c4 100644
--- a/src/Virt_ComputerSystemIndication.c
+++ b/src/Virt_ComputerSystemIndication.c
@@ -726,6 +726,10 @@ static bool wait_for_event(int wait_time)
         ret = pthread_cond_timedwait(&lifecycle_cond,
                                      &lifecycle_mutex,
                                      &timeout);
+        if (ret != 0) {
+                CU_DEBUG("timed wait failed with ret = %d", ret);
+                return false;
+        }
 
         return true;
 }
-- 
1.8.1.4




More information about the Libvirt-cim mailing list