Skip to content

[Bug] src/object.c 中对RT_NAME_MAX处理不统一 #10517

@Guozhanxin

Description

@Guozhanxin

RT-Thread Version

master

Hardware Type/Architectures

none

Develop Toolchain

Other

Describe the bug

rt_object_init

rt-thread/src/object.c

Lines 392 to 394 in 2d75100

#if RT_NAME_MAX > 0
rt_strncpy(object->name, name, RT_NAME_MAX); /* copy name */
#else

rt_object_allocate

rt-thread/src/object.c

Lines 493 to 495 in 2d75100

#if RT_NAME_MAX > 0
rt_strncpy(object->name, name, RT_NAME_MAX - 1); /* copy name */
#else

确认下是不是有问题,是不是bug

Other additional context

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions