summaryrefslogtreecommitdiff
path: root/src/object.c
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2014-12-24 12:20:04 +0800
committerBernard Xiong <[email protected]>2014-12-24 12:20:04 +0800
commit0338388090577c43b56f6219f459ba5535d62787 (patch)
tree482c021514ecfac67c83cd19e45102ebc25c22ad /src/object.c
parent9a1126e4a4f482ff0f866e2fc7f7a4bbaef2ab06 (diff)
parentee59452ee5897dc4cebd1d5e295063f4ccd32e13 (diff)
Merge pull request #398 from grissiom/misc-fix
Misc fix
Diffstat (limited to 'src/object.c')
-rw-r--r--src/object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/object.c b/src/object.c
index 32dc0f2384..6c5a1a026f 100644
--- a/src/object.c
+++ b/src/object.c
@@ -417,7 +417,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
{
const char *name_ptr;
int module_name_length;
-
+
name_ptr = name;
while ((*name_ptr != '\0') && (*name_ptr != '/'))
name_ptr ++;
@@ -434,13 +434,13 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
/* find module */
information = &rt_object_container[RT_Object_Class_Module];
- for (node = information->object_list.next;
+ for (node = information->object_list.next;
node != &(information->object_list);
node = node->next)
{
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;
@@ -450,7 +450,7 @@ rt_object_t rt_object_find(const char *name, rt_uint8_t type)
rt_exit_critical();
/* there is no this module inside the system */
- if (module == RT_NULL) return RT_NULL;
+ if (module == RT_NULL) return RT_NULL;
/* get the object pool of module */
information = &(module->module_object[type]);