diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:28:31 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2008-01-07 15:28:31 +0000 |
commit | 52e70cf409b9cffc54cf6a8cb6ad6168fa2b7d88 (patch) | |
tree | bc6b4334b2665805fd2c6ac69631d3b804276914 | |
parent | 2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-52e70cf409b9cffc54cf6a8cb6ad6168fa2b7d88.tar.bz2 |
2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* score/src/threadget.c: Use _Objects_Is_api_valid rather than open
coding it.
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/score/src/threadget.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index efcc331fba..7b9c0693d5 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2008-01-07 Joel Sherrill <joel.sherrill@oarcorp.com> + + * score/src/threadget.c: Use _Objects_Is_api_valid rather than open + coding it. + 2008-01-05 Chris Johns <chrisj@rtems.org> * configure.ac: Fix typo in the strict order mutex CPU OPTs test. diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c index 76ccf74091..126a6cc69f 100644 --- a/cpukit/score/src/threadget.c +++ b/cpukit/score/src/threadget.c @@ -64,7 +64,7 @@ Thread_Control *_Thread_Get ( } the_api = _Objects_Get_API( id ); - if ( the_api && the_api > OBJECTS_APIS_LAST ) { + if ( !_Objects_Is_api_valid( the_api ) ) { *location = OBJECTS_ERROR; goto done; } @@ -76,7 +76,6 @@ Thread_Control *_Thread_Get ( } information = _Objects_Information_table[ the_api ][ the_class ]; - if ( !information ) { *location = OBJECTS_ERROR; goto done; |