Explorar o código

修复了链表的bug

fslongjin %!s(int64=2) %!d(string=hai) anos
pai
achega
21844c8ba4
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      kernel/common/glib.h

+ 2 - 2
kernel/common/glib.h

@@ -119,8 +119,8 @@ static inline void list_del(struct List *entry)
      * @param entry 待删除的节点
      */
 
-    entry->prev->next = entry->next;
-    entry->next = entry->prev;
+    entry->next->prev = entry->prev;
+	entry->prev->next = entry->next;
 }
 
 static inline bool list_empty(struct List *entry)