diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-10-25 12:05:53 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-10-29 10:33:33 +0100 |
commit | 70382718450c6b5d83232188cc71b6c795048a27 (patch) | |
tree | 454cdea0181e12e183532d24cc7483fa28c9a09e /cpukit/score/src/objectsetname.c | |
parent | score: Remove bogus thread object name support (diff) | |
download | rtems-70382718450c6b5d83232188cc71b6c795048a27.tar.bz2 |
Remove RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES
Enable support for string objects names unconditionally. Add const
qualifier throughout. Split _Objects_Namespace_remove() into
_Objects_Namespace_remove_u32() and _Objects_Namespace_remove_string()
to avoid an unnecessary dependency on _Workspace_Free().
Update #2514.
Diffstat (limited to 'cpukit/score/src/objectsetname.c')
-rw-r--r-- | cpukit/score/src/objectsetname.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/cpukit/score/src/objectsetname.c b/cpukit/score/src/objectsetname.c index c699570209..227de515ec 100644 --- a/cpukit/score/src/objectsetname.c +++ b/cpukit/score/src/objectsetname.c @@ -24,9 +24,9 @@ #include <string.h> bool _Objects_Set_name( - Objects_Information *information, - Objects_Control *the_object, - const char *name + const Objects_Information *information, + Objects_Control *the_object, + const char *name ) { size_t length; @@ -35,7 +35,6 @@ bool _Objects_Set_name( s = name; length = strnlen( name, information->name_length ); -#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; @@ -49,16 +48,13 @@ bool _Objects_Set_name( strncpy( d, name, length ); d[length] = '\0'; the_object->name.name_p = d; - } else -#endif - { + } else { the_object->name.name_u32 = _Objects_Build_name( ((length) ? s[ 0 ] : ' '), ((length > 1) ? s[ 1 ] : ' '), ((length > 2) ? s[ 2 ] : ' '), ((length > 3) ? s[ 3 ] : ' ') ); - } return true; |