diff options
author | Carlos Falgueras García <carlosfg@riseup.net> | 2016-08-09 13:42:17 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-08-10 10:33:20 +0200 |
commit | b02d5d5b766e30a2afcbb706aa69ea7a51b40bc8 (patch) | |
tree | bebeb728f3b89cd09689699baf1896e3076ee0af /include/libnftnl/chain.h | |
parent | 21e062bb589cbea328c65dc37c96e1d91eacb920 (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/chain.h')
-rw-r--r-- | include/libnftnl/chain.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libnftnl/chain.h b/include/libnftnl/chain.h index ed21e48..26460a6 100644 --- a/include/libnftnl/chain.h +++ b/include/libnftnl/chain.h @@ -81,7 +81,7 @@ void nftnl_chain_list_del(struct nftnl_chain *c); struct nftnl_chain_list_iter; -struct nftnl_chain_list_iter *nftnl_chain_list_iter_create(struct nftnl_chain_list *l); +struct nftnl_chain_list_iter *nftnl_chain_list_iter_create(const struct nftnl_chain_list *l); struct nftnl_chain *nftnl_chain_list_iter_next(struct nftnl_chain_list_iter *iter); void nftnl_chain_list_iter_destroy(struct nftnl_chain_list_iter *iter); @@ -158,7 +158,7 @@ void nft_chain_list_del(struct nft_chain *c); struct nft_chain_list_iter; -struct nft_chain_list_iter *nft_chain_list_iter_create(struct nft_chain_list *l); +struct nft_chain_list_iter *nft_chain_list_iter_create(const struct nft_chain_list *l); struct nft_chain *nft_chain_list_iter_next(struct nft_chain_list_iter *iter); void nft_chain_list_iter_destroy(struct nft_chain_list_iter *iter); |