* [PATCH] [net/ipv6] Remove redundant null check in hbh_mt6
@ 2020-06-25 2:46 Gaurav Singh
0 siblings, 0 replies; only message in thread
From: Gaurav Singh @ 2020-06-25 2:46 UTC (permalink / raw)
To: gaurav1086, Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
Jakub Kicinski, open list:NETFILTER, open list:NETFILTER,
open list:NETWORKING [IPv4/IPv6], open list
oh cannot be NULL since its already checked above after
assignment and is being dereferenced before. Remove the
redundant null check.
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
---
net/ipv6/netfilter/ip6t_hbh.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c
index 467b2a86031b..e7a3fb9355ee 100644
--- a/net/ipv6/netfilter/ip6t_hbh.c
+++ b/net/ipv6/netfilter/ip6t_hbh.c
@@ -86,8 +86,7 @@ hbh_mt6(const struct sk_buff *skb, struct xt_action_param *par)
((optinfo->hdrlen == hdrlen) ^
!!(optinfo->invflags & IP6T_OPTS_INV_LEN))));
- ret = (oh != NULL) &&
- (!(optinfo->flags & IP6T_OPTS_LEN) ||
+ ret = (!(optinfo->flags & IP6T_OPTS_LEN) ||
((optinfo->hdrlen == hdrlen) ^
!!(optinfo->invflags & IP6T_OPTS_INV_LEN)));
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-25 2:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-25 2:46 [PATCH] [net/ipv6] Remove redundant null check in hbh_mt6 Gaurav Singh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).