coverity#1267660 etc.: remove redundant checks

...all these functions take a "handle to a created condition."

Change-Id: I043f310801452b05e6daaca4d246b305d18f6104
This commit is contained in:
Stephan Bergmann 2015-02-11 09:01:23 +01:00
parent 1b046598e0
commit 3ff852364b

View file

@ -105,11 +105,6 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
assert(Condition);
pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
@ -149,11 +144,6 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
@ -186,11 +176,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
SAL_INFO( "sal.osl.condition", "osl_waitCondition(" << pCond << ")" );
if ( pCond == 0 )
{
return osl_cond_result_error;
}
nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 )
{
@ -270,11 +255,6 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
assert(Condition);
pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock);
SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );