Re: [PATCH libnftnl] Fix compilation with JSON and XML parsing enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 09, 2015 at 12:21:07PM -0700, Vijay Subramanian wrote:
> Fix missing/incorrect variables.
> Also remove unsed variables to avoid warnings.

Applied this with minor nit.

> Signed-off-by: Vijay Subramanian <subramanian.vijay@xxxxxxxxx>
> ---
>  src/expr/dup.c   |   13 +++++--------
>  src/expr/limit.c |    2 +-
>  2 files changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/src/expr/dup.c b/src/expr/dup.c
> index d0fa35f..217450a 100644
> --- a/src/expr/dup.c
> +++ b/src/expr/dup.c
> @@ -115,18 +115,16 @@ static int nftnl_expr_dup_json_parse(struct nftnl_expr *e, json_t *root,
>  				     struct nftnl_parse_err *err)
>  {
>  #ifdef JSON_PARSING
> -	struct nftnl_expr_dup *dup = nftnl_expr_data(e);
>  	uint32_t sreg_addr, sreg_dev;
> -	int datareg_type;
> +	int ret = 0;

No need to initialize this, it will be override by next function call.

> -	ret = nftnl_jansson_parse_val(root, "sreg_addr", NFT_TYPE_U32, &sreg_addr, err);
> +	ret = nftnl_jansson_parse_val(root, "sreg_addr", NFTNL_TYPE_U32, &sreg_addr, err);

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux