diff options
Diffstat (limited to 'cpukit/score/src/objectnametoid.c')
-rw-r--r-- | cpukit/score/src/objectnametoid.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cpukit/score/src/objectnametoid.c b/cpukit/score/src/objectnametoid.c index bafa7b23f4..ba73bdbad6 100644 --- a/cpukit/score/src/objectnametoid.c +++ b/cpukit/score/src/objectnametoid.c @@ -21,14 +21,14 @@ #include <rtems/score/objectimpl.h> Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( - Objects_Information *information, - uint32_t name, - uint32_t node, - Objects_Id *id + uint32_t name, + uint32_t node, + Objects_Id *id, + const Objects_Information *information ) { bool search_local_node; - Objects_Control *the_object; + const Objects_Control *the_object; Objects_Maximum maximum; Objects_Maximum index; #if defined(RTEMS_MULTIPROCESSING) @@ -40,9 +40,6 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( if ( !id ) return OBJECTS_INVALID_ADDRESS; - if ( name == 0 ) - return OBJECTS_INVALID_NAME; - maximum = _Objects_Get_maximum_index( information ); search_local_node = false; @@ -61,6 +58,7 @@ Objects_Name_or_id_lookup_errors _Objects_Name_to_id_u32( if ( name == the_object->name.name_u32 ) { *id = the_object->id; + _Assert( name != 0 ); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } } |