object: fix module name testing

This commit is contained in:
Grissiom 2014-12-16 12:05:53 +08:00
parent 9a1126e4a4
commit c045281ee2
1 changed files with 4 additions and 4 deletions

View File

@ -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;