mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-03-27 09:32:28 +08:00
@@ -366,8 +366,7 @@ void rt_object_init(struct rt_object *object,
|
||||
/* set object type to static */
|
||||
object->type = type | RT_Object_Class_Static;
|
||||
/* copy name */
|
||||
rt_strncpy(object->name, name, RT_NAME_MAX - 1);
|
||||
object->name[RT_NAME_MAX - 1] = '\0';
|
||||
rt_strncpy(object->name, name, RT_NAME_MAX);
|
||||
|
||||
RT_OBJECT_HOOK_CALL(rt_object_attach_hook, (object));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user