From: Jérémie Galarneau Date: Wed, 12 Jun 2024 19:49:09 +0000 (-0400) Subject: cds_list: make cds_list_empty const X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ec0f993ce9313c680ed83ae24b6535df7f275bba;p=userspace-rcu.git cds_list: make cds_list_empty const 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 --- 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; }