[PATCH 3/3] score: Optimize _Objects_Name_to_id_u32()
Gedare Bloom
gedare at rtems.org
Sun Aug 30 16:42:25 UTC 2020
On Fri, Aug 21, 2020 at 2:32 AM Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> Remove the superfluous invalid name check since the object creation
> directives ensure that objects with such a name cannot exist. Also
Should it instead be a (debug) assert?
> finding an object with such a name would be no catastrophy if it really
> exists.
> ---
> cpukit/score/src/objectnametoid.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/cpukit/score/src/objectnametoid.c b/cpukit/score/src/objectnametoid.c
> index d89e161c8c..2a71c6e528 100644
> --- a/cpukit/score/src/objectnametoid.c
> +++ b/cpukit/score/src/objectnametoid.c
> @@ -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;
>
> --
> 2.26.2
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list