From 52e70cf409b9cffc54cf6a8cb6ad6168fa2b7d88 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 7 Jan 2008 15:28:31 +0000 Subject: 2008-01-07 Joel Sherrill * score/src/threadget.c: Use _Objects_Is_api_valid rather than open coding it. --- cpukit/ChangeLog | 5 +++++ 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 + + * score/src/threadget.c: Use _Objects_Is_api_valid rather than open + coding it. + 2008-01-05 Chris Johns * 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; -- cgit v1.2.3