From: Hai Shalom Date: Tue, 3 Nov 2020 02:14:11 +0000 (-0800) Subject: Change list arguments to const where possible X-Git-Tag: hostap_2_10~766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a7023ba6f4ef318f52efbd52c9f54459c06d6cb;p=thirdparty%2Fhostap.git Change list arguments to const where possible 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 --- diff --git a/src/utils/list.h b/src/utils/list.h index 85aa5e39c..5298c2626 100644 --- a/src/utils/list.h +++ b/src/utils/list.h @@ -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;