diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-19 20:55:55 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-19 20:55:55 +0000 |
commit | 30cd539354d30314cd5b023a10aa3c673415945e (patch) | |
tree | ddc676675818bbb4627739d5ecdc2549ea5fab5c /cpukit/sapi | |
parent | 2007-12-19 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-30cd539354d30314cd5b023a10aa3c673415945e.tar.bz2 |
2007-12-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* sapi/src/extension.c, sapi/src/extensioncreate.c,
sapi/src/extensiondelete.c, sapi/src/extensionident.c: Extension
Manager clean up. Update object id switches to new pattern. Catch
some NULL parameter errors.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/src/extension.c | 3 | ||||
-rw-r--r-- | cpukit/sapi/src/extensioncreate.c | 6 | ||||
-rw-r--r-- | cpukit/sapi/src/extensiondelete.c | 14 | ||||
-rw-r--r-- | cpukit/sapi/src/extensionident.c | 3 |
4 files changed, 13 insertions, 13 deletions
diff --git a/cpukit/sapi/src/extension.c b/cpukit/sapi/src/extension.c index 26fe365a03..d1e91a64a5 100644 --- a/cpukit/sapi/src/extension.c +++ b/cpukit/sapi/src/extension.c @@ -1,8 +1,7 @@ /* * Extension Manager * - * - * COPYRIGHT (c) 1989-2002. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be diff --git a/cpukit/sapi/src/extensioncreate.c b/cpukit/sapi/src/extensioncreate.c index 20ad321098..d2e146d6eb 100644 --- a/cpukit/sapi/src/extensioncreate.c +++ b/cpukit/sapi/src/extensioncreate.c @@ -1,8 +1,7 @@ /* * Extension Manager -- rtems_extension_create * - * - * COPYRIGHT (c) 1989-2002. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -47,6 +46,9 @@ rtems_status_code rtems_extension_create( { Extension_Control *the_extension; + if ( !id ) + return RTEMS_INVALID_ADDRESS; + if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; diff --git a/cpukit/sapi/src/extensiondelete.c b/cpukit/sapi/src/extensiondelete.c index 2021c9bcab..dd97859cd2 100644 --- a/cpukit/sapi/src/extensiondelete.c +++ b/cpukit/sapi/src/extensiondelete.c @@ -1,7 +1,6 @@ /* * Extension Manager -- rtems_extension_delete * - * * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * @@ -45,18 +44,19 @@ rtems_status_code rtems_extension_delete( the_extension = _Extension_Get( id, &location ); switch ( location ) { - case OBJECTS_ERROR: -#if defined(RTEMS_MULTIPROCESSING) - case OBJECTS_REMOTE: /* should never return this */ -#endif - return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); _Objects_Close( &_Extension_Information, &the_extension->Object ); _Extension_Free( the_extension ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; + +#if defined(RTEMS_MULTIPROCESSING) + case OBJECTS_REMOTE: /* should never return this */ +#endif + case OBJECTS_ERROR: + break; } - return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ + return RTEMS_INVALID_ID; } diff --git a/cpukit/sapi/src/extensionident.c b/cpukit/sapi/src/extensionident.c index d23a614f5b..79ba46f12f 100644 --- a/cpukit/sapi/src/extensionident.c +++ b/cpukit/sapi/src/extensionident.c @@ -1,8 +1,7 @@ /* * Extension Manager -- rtems_extension_ident * - * - * COPYRIGHT (c) 1989-2002. + * COPYRIGHT (c) 1989-2007. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be |