Explorar o código

:bug: 修复了list_empty的bug

fslongjin %!s(int64=3) %!d(string=hai) anos
pai
achega
b75504c0e5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;