summaryrefslogtreecommitdiffstats
path: root/include/libnftnl/table.h
diff options
context:
space:
mode:
authorCarlos Falgueras García <carlosfg@riseup.net>2016-08-09 13:42:17 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-08-10 10:33:20 +0200
commitb02d5d5b766e30a2afcbb706aa69ea7a51b40bc8 (patch)
treebebeb728f3b89cd09689699baf1896e3076ee0af /include/libnftnl/table.h
parent21e062bb589cbea328c65dc37c96e1d91eacb920 (diff)
src: Constify iterators
Iterators do not modify objects which they iterate, so input pointer must be const. Signed-off-by: Carlos Falgueras García <carlosfg@riseup.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/libnftnl/table.h')
-rw-r--r--include/libnftnl/table.h4
1 files changed, 2 insertions, 2 deletions
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);