From 7820a71113a0aa4ebd652d9125aafc416e3c426d Mon Sep 17 00:00:00 2001 From: David Xu Date: Mon, 13 Sep 2010 11:58:42 +0000 Subject: [PATCH] Don't compare thread pointers again. --- lib/libthr/thread/thr_affinity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libthr/thread/thr_affinity.c b/lib/libthr/thread/thr_affinity.c index 3f9322453f96..7e9b0f9620fc 100644 --- a/lib/libthr/thread/thr_affinity.c +++ b/lib/libthr/thread/thr_affinity.c @@ -70,13 +70,13 @@ _pthread_getaffinity_np(pthread_t td, size_t cpusetsize, cpuset_t *cpusetp) if (td == curthread) { error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, - (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + -1, cpusetsize, cpusetp); if (error == -1) error = errno; } else if ((error = _thr_find_thread(curthread, td, 0)) == 0) { tid = TID(td); - error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, - (td == curthread) ? -1 : tid, cpusetsize, cpusetp); + error = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, tid, + cpusetsize, cpusetp); if (error == -1) error = errno; THR_THREAD_UNLOCK(curthread, td);