From c01cff1a502b95ef6d5348e4b8bbfcf746b5d2e4 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 10 Dec 2018 12:46:03 +0100 Subject: Constify llist_count() parameter Counting list entires should not alter the list content: let's make this obvious from type signature. Change-Id: I414e67a3de733fab407161b3264d3b89070ba537 --- include/osmocom/core/linuxlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 8d0533f6..77913104 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -387,7 +387,7 @@ static inline void llist_splice_init(struct llist_head *llist, * This function is not efficient, mostly useful for small lists and non time * critical cases like unit tests. */ -static inline unsigned int llist_count(struct llist_head *head) +static inline unsigned int llist_count(const struct llist_head *head) { struct llist_head *entry; unsigned int i = 0; -- cgit v1.2.3