From: Mathieu Desnoyers Date: Wed, 12 Jun 2024 20:11:42 +0000 (-0400) Subject: cds_list: make cds_list_replace @old argument const X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4004aa467ec4198aed8825122ba1ae2822fd7979;p=urcu.git cds_list: make cds_list_replace @old argument const cds_list_replace doesn't modify its @old argument. Hence, it can be marked as `const`. Signed-off-by: Mathieu Desnoyers Change-Id: I8796448c04685b693f3f4acffec458f1be37a61d --- diff --git a/include/urcu/list.h b/include/urcu/list.h index 5f7c915..f2d77bb 100644 --- a/include/urcu/list.h +++ b/include/urcu/list.h @@ -88,7 +88,7 @@ void cds_list_move(struct cds_list_head *elem, struct cds_list_head *head) /* Replace an old entry. */ static inline -void cds_list_replace(struct cds_list_head *old, struct cds_list_head *_new) +void cds_list_replace(const struct cds_list_head *old, struct cds_list_head *_new) { _new->next = old->next; _new->prev = old->prev;