提交 c045281e 编写于 作者: G Grissiom

object: fix module name testing

上级 9a1126e4
...@@ -440,7 +440,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type) ...@@ -440,7 +440,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
{ {
object = rt_list_entry(node, struct rt_object, list); object = rt_list_entry(node, struct rt_object, list);
if ((rt_strncmp(object->name, name, module_name_length) == 0) && if ((rt_strncmp(object->name, name, module_name_length) == 0) &&
module_name_length == RT_NAME_MAX || object->name[module_name_length] == '\0') (module_name_length == RT_NAME_MAX || object->name[module_name_length] == '\0'))
{ {
/* get module */ /* get module */
module = (struct rt_module*)object; module = (struct rt_module*)object;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册