From c2b89540d202fb0c9ccd971947541f21df904979 Mon Sep 17 00:00:00 2001 From: Lingao Meng Date: Wed, 24 Apr 2024 13:23:54 +0800 Subject: [PATCH] include: queue.h: Make flink clear after sq_rem In the previous design, this member may be cleared or not cleared, which results in the API's side effects not being a clear property. Signed-off-by: Lingao Meng --- include/nuttx/queue.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/nuttx/queue.h b/include/nuttx/queue.h index f6e7c4af51..4092ca88ef 100644 --- a/include/nuttx/queue.h +++ b/include/nuttx/queue.h @@ -188,6 +188,10 @@ { \ (q)->tail = NULL; \ } \ + else \ + { \ + tmp_node->flink = NULL; \ + } \ } \ else \ { \