diff mbox series

[net-next,08/19] netfilter: nf_tables: Drop pointless memset in nf_tables_dump_obj

Message ID 20231025212555.132775-9-pablo@netfilter.org
State Awaiting Upstream
Headers show
Series [net-next,01/19] netfilter: nft_set_rbtree: rename gc deactivate+erase function | expand

Commit Message

Pablo Neira Ayuso Oct. 25, 2023, 9:25 p.m. UTC
From: Phil Sutter <phil@nwl.cc>

The code does not make use of cb->args fields past the first one, no
need to zero them.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/nf_tables_api.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 03a306d15f43..fa216d1cfb74 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7717,9 +7717,6 @@  static int nf_tables_dump_obj(struct sk_buff *skb, struct netlink_callback *cb)
 				goto cont;
 			if (idx < s_idx)
 				goto cont;
-			if (idx > s_idx)
-				memset(&cb->args[1], 0,
-				       sizeof(cb->args) - sizeof(cb->args[0]));
 			if (filter && filter->table &&
 			    strcmp(filter->table, table->name))
 				goto cont;