Made list pointer passed to linkedlist_length const.
@@ -127,13 +127,13 @@ static inline void linkedlist_prepend(struct ListHead **list, struct ListHead *n
* @details Returns the length of a linked list
* @param list a pointer to the linked list
*/
-static inline size_t linkedlist_length(struct ListHead *list)
+static inline size_t linkedlist_length(const struct ListHead *list)
{
if (list == NULL) {
return 0;
} else {
size_t len = 0;
- struct ListHead *curr = list;
+ const struct ListHead *curr = list;
do {
len++;
curr = curr->next;
