{
rc= MEMCACHED_SUCCESS;
- if (pthread_mutex_lock(&mutex))
+ int error;
+ if ((error= pthread_mutex_lock(&mutex)) != 0)
{
rc= MEMCACHED_IN_PROGRESS;
return NULL;
{
if (relative_time.tv_sec == 0 and relative_time.tv_nsec == 0)
{
- pthread_mutex_unlock(&mutex);
+ error= pthread_mutex_unlock(&mutex);
rc= MEMCACHED_NOTFOUND;
return NULL;
int thread_ret;
if ((thread_ret= pthread_cond_timedwait(&cond, &mutex, &time_to_wait)) != 0)
{
- pthread_mutex_unlock(&mutex);
+ int unlock_error;
+ if ((unlock_error= pthread_mutex_unlock(&mutex)) != 0)
+ {
+ }
if (thread_ret == ETIMEDOUT)
{
}
else if (grow_pool(this) == false)
{
- (void)pthread_mutex_unlock(&mutex);
+ int unlock_error;
+ if ((unlock_error= pthread_mutex_unlock(&mutex)) != 0)
+ {
+ }
+
return NULL;
}
} while (ret == NULL);
- pthread_mutex_unlock(&mutex);
+ if ((error= pthread_mutex_unlock(&mutex)) != 0)
+ {
+ }
return ret;
}
return false;
}
- if (pthread_mutex_lock(&mutex))
+ int error;
+ if ((error= pthread_mutex_lock(&mutex)))
{
rc= MEMCACHED_IN_PROGRESS;
return false;
if (firstfree == 0 and current_size == size)
{
/* we might have people waiting for a connection.. wake them up :-) */
- pthread_cond_broadcast(&cond);
+ if ((error= pthread_cond_broadcast(&cond)) != 0)
+ {
+ }
}
- (void)pthread_mutex_unlock(&mutex);
+ if ((error= pthread_mutex_unlock(&mutex)) != 0)
+ {
+ }
return true;
}
return MEMCACHED_INVALID_ARGUMENTS;
}
- if (pthread_mutex_lock(&pool->mutex))
+ int error;
+ if ((error= pthread_mutex_lock(&pool->mutex)))
{
return MEMCACHED_IN_PROGRESS;
}
memcached_return_t rc= memcached_behavior_set(pool->master, flag, data);
if (memcached_failed(rc))
{
- (void)pthread_mutex_unlock(&pool->mutex);
+ if ((error= pthread_mutex_unlock(&pool->mutex)) != 0)
+ {
+ }
return rc;
}
}
}
- (void)pthread_mutex_unlock(&pool->mutex);
+ if ((error= pthread_mutex_unlock(&pool->mutex)) != 0)
+ {
+ }
return rc;
}
return MEMCACHED_INVALID_ARGUMENTS;
}
- if (pthread_mutex_lock(&pool->mutex))
+ int error;
+ if ((error= pthread_mutex_lock(&pool->mutex)))
{
return MEMCACHED_IN_PROGRESS;
}
*value= memcached_behavior_get(pool->master, flag);
- (void)pthread_mutex_unlock(&pool->mutex);
+ if ((error= pthread_mutex_unlock(&pool->mutex)) != 0)
+ {
+ }
return MEMCACHED_SUCCESS;
}