Re: [PATCH libnftnl] expr: osf: modify _snprintf_default function

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

 



On Tue, Aug 07, 2018 at 11:42:15AM +0200, Fernando Fernandez Mancera wrote:
> Signed-off-by: Fernando Fernandez Mancera <ffmancera@xxxxxxxxxx>
> ---
>  src/expr/osf.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/expr/osf.c b/src/expr/osf.c
> index 1541390..ac7a6f3 100644
> --- a/src/expr/osf.c
> +++ b/src/expr/osf.c
> @@ -91,11 +91,10 @@ nftnl_expr_osf_parse(struct nftnl_expr *e, struct nlattr *attr)
>  static int nftnl_expr_osf_snprintf_default(char *buf, size_t size,
>  					   const struct nftnl_expr *e)
>  {
> -	struct nftnl_expr_osf *osf = nftnl_expr_data(e);
>  	int ret, offset = 0, len = size;
>  
>  	if (e->flags & (1 << NFTNL_EXPR_OSF_DREG)) {
> -		ret = snprintf(buf, len, "%u", osf->dreg);
> +		ret = snprintf(buf, len, " ");

Ah, I see.

The "1" is actually the register, I got confused.

I have mangled this patch to make it "dreg %u " since this is still
useful and I don't get confused.

Applied with changes, thanks.
--
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