Make sl_list_length const correct

This commit is contained in:
Mario Hüttel 2022-10-23 15:44:45 +02:00
parent 18b3ab377a
commit c20b5c2528
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ void sl_list_free_full(SlList *list, void (*destroy_element)(void *));
* @param list List
* @return Length of list
*/
uint32_t sl_list_length(SlList *list);
uint32_t sl_list_length(const SlList *list);
/**
* @brief Get nth element in list.

View File

@ -117,7 +117,7 @@ void sl_list_free_full(SlList *list, void (*destroy_element)(void *))
}
}
uint32_t sl_list_length(SlList *list)
uint32_t sl_list_length(const SlList *list)
{
uint32_t count = 0;