diff options
author | davidxu <davidxu@FreeBSD.org> | 2007-11-21 05:25:27 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2007-11-21 05:25:27 +0000 |
commit | a0922e4b91f0c4903c8c6dac097a301164ca8522 (patch) | |
tree | 2fc7bb00cb6a45ff648aee6c40f3634cfb20a002 /lib/libthr | |
parent | e90ed63757fe1ab4307c97ac46ac5da3fdd2ad99 (diff) | |
download | FreeBSD-src-a0922e4b91f0c4903c8c6dac097a301164ca8522.zip FreeBSD-src-a0922e4b91f0c4903c8c6dac097a301164ca8522.tar.gz |
Convert ceiling type to unsigned integer before comparing, fix compiler
warnings.
Diffstat (limited to 'lib/libthr')
-rw-r--r-- | lib/libthr/thread/thr_mutex.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index a1f2734..1337ae0 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -749,11 +749,11 @@ _pthread_mutex_setprioceiling(pthread_mutex_t *mutex, MUTEX_ASSERT_IS_OWNED(m); m1 = TAILQ_PREV(m, mutex_queue, m_qe); m2 = TAILQ_NEXT(m, m_qe); - if ((m1 != NULL && m1->m_lock.m_ceilings[0] > ceiling) || - (m2 != NULL && m2->m_lock.m_ceilings[0] < ceiling)) { + if ((m1 != NULL && m1->m_lock.m_ceilings[0] > (u_int)ceiling) || + (m2 != NULL && m2->m_lock.m_ceilings[0] < (u_int)ceiling)) { TAILQ_REMOVE(&curthread->pp_mutexq, m, m_qe); TAILQ_FOREACH(m2, &curthread->pp_mutexq, m_qe) { - if (m2->m_lock.m_ceilings[0] > ceiling) { + if (m2->m_lock.m_ceilings[0] > (u_int)ceiling) { TAILQ_INSERT_BEFORE(m2, m, m_qe); return (0); } |