object: fix module name testing
This commit is contained in:
parent
9a1126e4a4
commit
c045281ee2
|
@ -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);
|
||||
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 */
|
||||
module = (struct rt_module*)object;
|
||||
|
|
Loading…
Reference in New Issue