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

Wenchao Xia xiawenc at linux.vnet.ibm.com
Fri Mar 15 08:07:44 UTC 2013


于 2013-3-15 6:55, John Ferlan 写道:
> 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

-- 
Best Regards

Wenchao Xia




More information about the Libvirt-cim mailing list