From ec75831c439ebd3475e0ba6766188d963538129a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 6 Aug 2013 11:36:54 +0200 Subject: src: fully constify nft_*_get functions We have several char * field that were not constify to avoid gcc compilation warnings when calling free. Since (99d2574 src: add xfree and use it), we can fully constify these objects fields without trouble. Signed-off-by: Pablo Neira Ayuso --- include/libnftables/chain.h | 2 +- include/libnftables/set.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/libnftables/chain.h b/include/libnftables/chain.h index 53fd407..e80d007 100644 --- a/include/libnftables/chain.h +++ b/include/libnftables/chain.h @@ -35,7 +35,7 @@ void nft_chain_attr_set_s32(struct nft_chain *t, uint16_t attr, int32_t data); void nft_chain_attr_set_u64(struct nft_chain *t, uint16_t attr, uint64_t data); void nft_chain_attr_set_str(struct nft_chain *t, uint16_t attr, const char *str); -void *nft_chain_attr_get(struct nft_chain *c, uint16_t attr); +const void *nft_chain_attr_get(struct nft_chain *c, uint16_t attr); const char *nft_chain_attr_get_str(struct nft_chain *c, uint16_t attr); uint32_t nft_chain_attr_get_u32(struct nft_chain *c, uint16_t attr); int32_t nft_chain_attr_get_s32(struct nft_chain *c, uint16_t attr); diff --git a/include/libnftables/set.h b/include/libnftables/set.h index 4fc3a8d..06380d4 100644 --- a/include/libnftables/set.h +++ b/include/libnftables/set.h @@ -26,7 +26,7 @@ void nft_set_attr_set(struct nft_set *s, uint16_t attr, const void *data); void nft_set_attr_set_u32(struct nft_set *s, uint16_t attr, uint32_t val); void nft_set_attr_set_str(struct nft_set *s, uint16_t attr, const char *str); -void *nft_set_attr_get(struct nft_set *s, uint16_t attr); +const void *nft_set_attr_get(struct nft_set *s, uint16_t attr); const char *nft_set_attr_get_str(struct nft_set *s, uint16_t attr); uint32_t nft_set_attr_get_u32(struct nft_set *s, uint16_t attr); -- cgit v1.2.3