🐛 修复了list_empty的bug

This commit is contained in:
fslongjin 2022-04-08 21:25:16 +08:00
parent 9828aff985
commit b75504c0e5

View File

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