summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cache.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cache.c b/src/cache.c
index c8ef1603..b75a5bf3 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1118,15 +1118,14 @@ err_ctx_list:
static int implicit_chain_cache(struct netlink_ctx *ctx, struct table *table,
const char *chain_name)
{
- struct nft_cache_filter filter;
+ struct nft_cache_filter filter = {};
struct chain *chain;
int ret = 0;
list_for_each_entry(chain, &table->chain_bindings, cache.list) {
- filter.list = (typeof(filter.list)) {
- .table = table->handle.table.name,
- .chain = chain->handle.chain.name,
- };
+ filter.list.table = table->handle.table.name;
+ filter.list.chain = chain->handle.chain.name;
+
ret = rule_init_cache(ctx, table, &filter);
}