]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Change list arguments to const where possible
authorHai Shalom <haishalom@google.com>
Tue, 3 Nov 2020 02:14:11 +0000 (18:14 -0800)
committerJouni Malinen <j@w1.fi>
Mon, 16 Nov 2020 13:50:44 +0000 (15:50 +0200)
Change struct dl_list pointer argument to const in list functions that
do not manipulate the list: dl_list_len() and dl_list_empty().

Signed-off-by: Hai Shalom <haishalom@google.com>
src/utils/list.h

index 85aa5e39cfe16d6cb78caa4723948e6a26b0302c..5298c26264d1fc1ce9b57d4769c7f730b392aff3 100644 (file)
@@ -46,12 +46,12 @@ static inline void dl_list_del(struct dl_list *item)
        item->prev = NULL;
 }
 
-static inline int dl_list_empty(struct dl_list *list)
+static inline int dl_list_empty(const struct dl_list *list)
 {
        return list->next == list;
 }
 
-static inline unsigned int dl_list_len(struct dl_list *list)
+static inline unsigned int dl_list_len(const struct dl_list *list)
 {
        struct dl_list *item;
        int count = 0;