summaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter/ip6t_hbh.c
diff options
context:
space:
mode:
authorGaurav Singh <gaurav1086@gmail.com>2020-07-26 21:52:05 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2020-07-29 20:39:43 +0200
commit42f36eba71c4f0c532d6de761c154d00f9f1900d (patch)
tree76e3066bb677be07143c1831c23e5e7b0acaf5b2 /net/ipv6/netfilter/ip6t_hbh.c
parent50935339c394adfb3d7253055e3bc10ee70264b0 (diff)
downloadlinux-42f36eba71c4f0c532d6de761c154d00f9f1900d.tar.bz2
netfilter: ip6tables: Remove redundant null checks
Remove superfluous check for NULL pointer to header. Signed-off-by: Gaurav Singh <gaurav1086@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter/ip6t_hbh.c')
-rw-r--r--net/ipv6/netfilter/ip6t_hbh.c3
1 files changed, 1 insertions, 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)));