From b02d5d5b766e30a2afcbb706aa69ea7a51b40bc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Falgueras=20Garc=C3=ADa?= Date: Tue, 9 Aug 2016 13:42:17 +0200 Subject: src: Constify iterators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Iterators do not modify objects which they iterate, so input pointer must be const. Signed-off-by: Carlos Falgueras GarcĂ­a Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/table.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/libnftnl/table.h') diff --git a/include/libnftnl/table.h b/include/libnftnl/table.h index 1f9ab1c..296667b 100644 --- a/include/libnftnl/table.h +++ b/include/libnftnl/table.h @@ -69,7 +69,7 @@ void nftnl_table_list_del(struct nftnl_table *r); struct nftnl_table_list_iter; -struct nftnl_table_list_iter *nftnl_table_list_iter_create(struct nftnl_table_list *l); +struct nftnl_table_list_iter *nftnl_table_list_iter_create(const struct nftnl_table_list *l); struct nftnl_table *nftnl_table_list_iter_next(struct nftnl_table_list_iter *iter); void nftnl_table_list_iter_destroy(const struct nftnl_table_list_iter *iter); @@ -134,7 +134,7 @@ void nft_table_list_del(struct nft_table *r); struct nft_table_list_iter; -struct nft_table_list_iter *nft_table_list_iter_create(struct nft_table_list *l); +struct nft_table_list_iter *nft_table_list_iter_create(const struct nft_table_list *l); struct nft_table *nft_table_list_iter_next(struct nft_table_list_iter *iter); void nft_table_list_iter_destroy(struct nft_table_list_iter *iter); -- cgit v1.2.3