Răsfoiți Sursa

:bug: 修复了list_empty的bug

fslongjin 3 ani în urmă
părinte
comite
b75504c0e5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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;