This is an automated email from the ASF dual-hosted git repository.

ligd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new c2b89540d2 include: queue.h: Make flink clear after sq_rem
c2b89540d2 is described below

commit c2b89540d202fb0c9ccd971947541f21df904979
Author: Lingao Meng <menglin...@xiaomi.com>
AuthorDate: Wed Apr 24 13:23:54 2024 +0800

    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 <menglin...@xiaomi.com>
---
 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 \
             { \

Reply via email to