Skip to contentSkip to conversation

netfilter: xtables: Remove unnecessary initialization of struct ts_state

PATCH Applied Bojan Prtvar 2 participants 2 messages Sep 8, 2014 – Sep 9, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: xtables: Remove unnecessary initialization of struct ts_state

The skb_find_text() accepts uninitialized textsearch state variable.

---
 net/netfilter/xt_string.c | 1 -
 1 file changed, 1 deletion(-)
net/netfilter/xt_string.c +0 -1
index d3c48b1..5699adb 100644
@@ -29,7 +29,6 @@ string_mt(const struct sk_buff *skb, struct xt_action_param *par)
 	struct ts_state state;
 	bool invert;
 
-	memset(&state, 0, sizeof(struct ts_state));
 	invert = conf->u.v1.flags & XT_STRING_FLAG_INVERT;
 
 	return (skb_find_text((struct sk_buff *)skb, conf->from_offset,
Signature · 1 line
1.9.1.286.g5172cb3
maintainer Applied
#1 lore raw
Quoted 1 line · Bojan Prtvar

The skb_find_text() accepts uninitialized textsearch state variable.

Applied, thanks.