summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2018-12-10 12:46:03 +0100
committerMax <msuraev@sysmocom.de>2018-12-10 13:42:08 +0000
commitc01cff1a502b95ef6d5348e4b8bbfcf746b5d2e4 (patch)
tree8914beca9246a94bfa8982d625ec63a851b5ee07
parent6aa20eee29846fd86b2ac9c79948d466794cfe68 (diff)
Constify llist_count() parameter
Counting list entires should not alter the list content: let's make this obvious from type signature. Change-Id: I414e67a3de733fab407161b3264d3b89070ba537
-rw-r--r--include/osmocom/core/linuxlist.h2
1 files changed, 1 insertions, 1 deletions
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;