Browse Source

:bug: 修复了list_empty的bug

fslongjin 2 years ago
parent
commit
b75504c0e5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/common/glib.h

+ 1 - 1
kernel/common/glib.h

@@ -132,7 +132,7 @@ static inline bool list_empty(struct List *entry)
      * @param entry 入口
      */
 
-    if (entry->prev == entry->next)
+    if(entry == entry->next && entry->prev == entry)
         return true;
     else
         return false;