netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store
Subsystems (3)
PATCH 1/1 netfilter: nft_osf: use enum nft_data_types for nft_validate_register_store
The function nft_validate_register_store requires a struct of type struct nft_data_types. NFTA_DATA_VALUE is of type enum nft_verdict_attributes. Pass the correct enum type.
This fixes a warning seen with Clang:
net/netfilter/nft_osf.c:52:8: warning: implicit conversion from
enumeration type 'enum nft_data_attributes' to different enumeration type 'enum nft_data_types' [-Wenum-conversion]
NFTA_DATA_VALUE, NFT_OSF_MAXGENRELEN); ^~~~~~~~~~~~~~~
--- net/netfilter/nft_osf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nft_osf.c +1 -1
@@ -49,7 +49,7 @@ static int nft_osf_init(const struct nft_ctx *ctx, priv->dreg =nft_parse_register (tb[NFTA_OSF_DREG ]); err =nft_validate_register_store (ctx, priv->dreg,NULL , -NFTA_DATA_VALUE ,NFT_OSF_MAXGENRELEN ); +NFT_DATA_VALUE ,NFT_OSF_MAXGENRELEN );if (err <0 )return err;
Signature · 1 line
2.19.0
Quoted 3 lines · Stefan Agner
The function
nft_validate_register_storerequires a struct of type structnft_data_types.NFTA_DATA_VALUEis of type enumnft_verdict_attributes. Pass the correct enum type.
Applied, thanks.