Skip to content
Snippets Groups Projects
Commit f2ff06c9 authored by Jose Alamos's avatar Jose Alamos
Browse files

posix/pthread_rwlock: fix unsigned variable comparison

parent 69b2baee
No related branches found
No related tags found
No related merge requests found
...@@ -191,7 +191,7 @@ static int pthread_rwlock_timedlock(pthread_rwlock_t *rwlock, ...@@ -191,7 +191,7 @@ static int pthread_rwlock_timedlock(pthread_rwlock_t *rwlock,
uint64_t then = ((uint64_t)abstime->tv_sec * US_PER_SEC) + uint64_t then = ((uint64_t)abstime->tv_sec * US_PER_SEC) +
(abstime->tv_nsec / NS_PER_US); (abstime->tv_nsec / NS_PER_US);
if ((then - now) <= 0) { if (now >= then) {
return ETIMEDOUT; return ETIMEDOUT;
} }
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment