Kaydet (Commit) 3ff85236 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

coverity#1267660 etc.: remove redundant checks

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

Change-Id: I043f310801452b05e6daaca4d246b305d18f6104
üst 1b046598
...@@ -105,11 +105,6 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition) ...@@ -105,11 +105,6 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
assert(Condition); assert(Condition);
pCond = (oslConditionImpl*)Condition; pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock); nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 ) if ( nRet != 0 )
{ {
...@@ -149,11 +144,6 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition) ...@@ -149,11 +144,6 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
pCond = (oslConditionImpl*)Condition; pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock); nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 ) if ( nRet != 0 )
{ {
...@@ -186,11 +176,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time ...@@ -186,11 +176,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
SAL_INFO( "sal.osl.condition", "osl_waitCondition(" << pCond << ")" ); SAL_INFO( "sal.osl.condition", "osl_waitCondition(" << pCond << ")" );
if ( pCond == 0 )
{
return osl_cond_result_error;
}
nRet = pthread_mutex_lock(&pCond->m_Lock); nRet = pthread_mutex_lock(&pCond->m_Lock);
if ( nRet != 0 ) if ( nRet != 0 )
{ {
...@@ -270,11 +255,6 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition) ...@@ -270,11 +255,6 @@ sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
assert(Condition); assert(Condition);
pCond = (oslConditionImpl*)Condition; pCond = (oslConditionImpl*)Condition;
if ( pCond == 0 )
{
return sal_False;
}
nRet = pthread_mutex_lock(&pCond->m_Lock); nRet = pthread_mutex_lock(&pCond->m_Lock);
SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) ); SAL_WARN_IF( nRet != 0, "sal.osl.condition", "osl_checkCondition(" << pCond << "): pthread_mutex_lock failed: " << strerror(nRet) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment