From: luo penghao Date: Thu, 4 Nov 2021 06:26:21 +0000 (+0000) Subject: xfrm: Remove duplicate assignment X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2e1809208a4a52e883527c288b4fca61a90100b2;p=linux.git xfrm: Remove duplicate assignment The statement in the switch is repeated with the statement at the beginning of the while loop, so this statement is meaningless. The clang_analyzer complains as follows: net/xfrm/xfrm_policy.c:3392:2 warning: Value stored to 'exthdr' is never read Reported-by: Zeal Robot Signed-off-by: luo penghao Signed-off-by: Steffen Klassert --- diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 1a06585022abb..edc673e78114f 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -3392,7 +3392,6 @@ decode_session6(struct sk_buff *skb, struct flowi *fl, bool reverse) case NEXTHDR_DEST: offset += ipv6_optlen(exthdr); nexthdr = exthdr->nexthdr; - exthdr = (struct ipv6_opt_hdr *)(nh + offset); break; case IPPROTO_UDP: case IPPROTO_UDPLITE: