Fix error reported by Coverity:
** CID
1324336: Code maintainability issues (UNUSED_VALUE)
/compat_futex.c: 99 in compat_futex_noasync()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
int compat_futex_noasync(int32_t *uaddr, int op, int32_t val,
const struct timespec *timeout, int32_t *uaddr2, int32_t val3)
{
- int ret;
+ int ret, lockret;
/*
* Check if NULL. Don't let users expect that they are taken into
*/
cmm_smp_mb();
- ret = pthread_mutex_lock(&__urcu_compat_futex_lock);
- if (ret) {
- errno = ret;
+ lockret = pthread_mutex_lock(&__urcu_compat_futex_lock);
+ if (lockret) {
+ errno = lockret;
ret = -1;
goto end;
}
errno = EINVAL;
ret = -1;
}
- ret = pthread_mutex_unlock(&__urcu_compat_futex_lock);
- if (ret) {
- errno = ret;
+ lockret = pthread_mutex_unlock(&__urcu_compat_futex_lock);
+ if (lockret) {
+ errno = lockret;
ret = -1;
}
end: