From 41175cec8407da4687493a9f74043656682d470a Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 25 Feb 2014 22:27:12 +0100 Subject: src: early attribute type validation in nft_*_attr_set This allows us to remove the default case in the switch, which show help to spot missing attribute support since gcc will spot a compilation warning. Signed-off-by: Pablo Neira Ayuso --- include/libnftnl/set.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/libnftnl/set.h') diff --git a/include/libnftnl/set.h b/include/libnftnl/set.h index 7fa9fb2..ba11315 100644 --- a/include/libnftnl/set.h +++ b/include/libnftnl/set.h @@ -17,7 +17,9 @@ enum { NFT_SET_ATTR_DATA_TYPE, NFT_SET_ATTR_DATA_LEN, NFT_SET_ATTR_FAMILY, + __NFT_SET_ATTR_MAX }; +#define NFT_SET_ATTR_MAX (__NFT_SET_ATTR_MAX - 1) struct nft_set; -- cgit v1.2.3