소스 검색

: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;