* [PATCH] [net/ipv6] remove redundant null check in frag_mt6
@ 2020-06-25 2:42 Gaurav Singh
0 siblings, 0 replies; only message in thread
From: Gaurav Singh @ 2020-06-25 2:42 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
fh 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_frag.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c
index fb91eeee4a1e..3aad6439386b 100644
--- a/net/ipv6/netfilter/ip6t_frag.c
+++ b/net/ipv6/netfilter/ip6t_frag.c
@@ -85,8 +85,7 @@ frag_mt6(const struct sk_buff *skb, struct xt_action_param *par)
!((fraginfo->flags & IP6T_FRAG_NMF) &&
(ntohs(fh->frag_off) & IP6_MF)));
- return (fh != NULL) &&
- id_match(fraginfo->ids[0], fraginfo->ids[1],
+ return id_match(fraginfo->ids[0], fraginfo->ids[1],
ntohl(fh->identification),
!!(fraginfo->invflags & IP6T_FRAG_INV_IDS)) &&
!((fraginfo->flags & IP6T_FRAG_RES) &&
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-25 2:42 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:42 [PATCH] [net/ipv6] remove redundant null check in frag_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).