diff mbox series

[nf-next,1/6] netfilter: nf_tables: Drop pointless memset in nf_tables_dump_obj

Message ID 20231020173433.4611-2-phil@nwl.cc
State Accepted, archived
Headers show
Series Refactor nft_obj_filter into nft_obj_dump_ctx | expand

Commit Message

Phil Sutter Oct. 20, 2023, 5:34 p.m. UTC
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>
---
 net/netfilter/nf_tables_api.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Pablo Neira Ayuso Oct. 25, 2023, 9:48 a.m. UTC | #1
On Fri, Oct 20, 2023 at 07:34:28PM +0200, Phil Sutter wrote:
> The code does not make use of cb->args fields past the first one, no
> need to zero them.

Series applied to nf-next, thanks
diff mbox series

Patch

diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 20734fbb0d94..0f7ee76ad64f 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7725,9 +7725,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;