فهرست منبع

:bug: 修复了list_empty的bug

fslongjin 3 سال پیش
والد
کامیت
b75504c0e5
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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;