From ec0f993ce9313c680ed83ae24b6535df7f275bba Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Wed, 12 Jun 2024 15:49:09 -0400 Subject: [PATCH] cds_list: make cds_list_empty const MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit cds_list_empty doesn't modify its argument. Hence, it can be marked as `const`. Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers Change-Id: Iba952e41543fd6c2e1d6dc8290a20803fa14ce10 --- include/urcu/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/urcu/list.h b/include/urcu/list.h index 4bc88b3..5f7c915 100644 --- a/include/urcu/list.h +++ b/include/urcu/list.h @@ -169,7 +169,7 @@ void cds_list_splice(struct cds_list_head *add, struct cds_list_head *head) pos = (p), p = cds_list_entry((pos)->member.next, __typeof__(*(pos)), member)) static inline -int cds_list_empty(struct cds_list_head *head) +int cds_list_empty(const struct cds_list_head *head) { return head == head->next; } -- 2.34.1