cds_list: make cds_list_replace @old argument const
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Jun 2024 20:11:42 +0000 (16:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Jun 2024 20:11:42 +0000 (16:11 -0400)
cds_list_replace doesn't modify its @old argument. Hence, it can be
marked as `const`.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8796448c04685b693f3f4acffec458f1be37a61d

include/urcu/list.h

index 5f7c915fa5be7cde512270c6492da91503dd607e..f2d77bb067d0c0ff69342b2aea374cf62706c981 100644 (file)
@@ -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;
This page took 0.031266 seconds and 4 git commands to generate.