2009-07-08 Joel Sherrill <joel.sherrill@OARcorp.com>

* score/src/objectgetinfo.c: Clean up and eliminate unreachable code.
This commit is contained in:
Joel Sherrill
2009-07-08 17:56:07 +00:00
parent 67d6947e7f
commit 4b4108a4c5
2 changed files with 12 additions and 5 deletions

View File

@@ -1,3 +1,7 @@
2009-07-08 Joel Sherrill <joel.sherrill@OARcorp.com>
* score/src/objectgetinfo.c: Clean up and eliminate unreachable code.
2009-07-07 Joel Sherrill <joel.sherrill@oarcorp.com>
* rtems/src/rtemsobjectapimaximumclass.c,

View File

@@ -26,15 +26,18 @@ Objects_Information *_Objects_Get_information(
Objects_Information *info;
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
return NULL;
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
if ( the_class_api_maximum == 0 ||
the_class > (uint32_t) the_class_api_maximum )
if ( the_class_api_maximum == 0 )
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )