[kernel] rt_object_delete函数优化重置object->type

object->type = 0;
改为
object->type = RT_Object_Class_Null;
一个东西,但是提高源码可读性
This commit is contained in:
Meco Man 2020-11-24 04:17:50 +08:00 committed by GitHub
parent 3634621815
commit 05f631aa3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ void rt_object_delete(rt_object_t object)
RT_OBJECT_HOOK_CALL(rt_object_detach_hook, (object));
/* reset object type */
object->type = 0;
object->type = RT_Object_Class_Null;
/* lock interrupt */
temp = rt_hw_interrupt_disable();