summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/posix/src/mutextimedlock.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index cc780451a8..8a3a1a4b48 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-21 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * posix/src/mutextimedlock.c: Check status local variable not
+ lock_status.
+
2010-10-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/lib/ftpfs.c: Do not fall back to BOOTP server address
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c
index 576eba9eb8..7773d84af6 100644
--- a/cpukit/posix/src/mutextimedlock.c
+++ b/cpukit/posix/src/mutextimedlock.c
@@ -72,10 +72,10 @@ int pthread_mutex_timedlock(
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
- if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
+ if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
- if ( lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
- lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
+ if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
+ status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}