On Wed, Aug 16, 2017 at 10:43:02PM +0200, Eric Leblond wrote: [...] > diff --git a/include/cli.h b/include/cli.h > index e577400..899c8a6 100644 > --- a/include/cli.h > +++ b/include/cli.h > @@ -6,7 +6,7 @@ > struct parser_state; > #ifdef HAVE_LIBREADLINE > extern int cli_init(struct nft_ctx *nft, struct mnl_socket *nf_sock, > - struct nft_cache *cache, struct parser_state *state); > + struct parser_state *state); One could get rid of nf_sock parameter as well since that resides in nft_ctx, too. [...] > diff --git a/src/cli.c b/src/cli.c > index 7501b29..fd5c7b7 100644 > --- a/src/cli.c > +++ b/src/cli.c > @@ -177,13 +177,17 @@ void __fmtstring(1, 0) cli_display(const char *fmt, va_list ap) > } > > int cli_init(struct nft_ctx *nft, struct mnl_socket *nf_sock, > - struct nft_cache *cache, struct parser_state *_state) > + struct parser_state *_state) > { > const char *home; > + struct nft_cache cache; > + > + memset(&cache, 0, sizeof(cache)); > + init_list_head(&cache.list); Is this a leftover, or do you intentionally use a new cache instance instead of nft->cache? Cheers, Phil -- 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