Skip to content

Commit 681c024

Browse files
committed
双向链表,判断空修正
1 parent cfd5eba commit 681c024

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/rtservice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ rt_inline void rt_list_remove(rt_list_t *n)
100100
*/
101101
rt_inline int rt_list_isempty(const rt_list_t *l)
102102
{
103-
return l->next == l;
103+
return l->next == l && l->prev == l;
104104
}
105105

106106
/**

0 commit comments

Comments
 (0)