diff options
author | Yang Li <yang.lee@linux.alibaba.com> | 2021-04-25 13:14:32 +0300 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2021-05-14 14:44:39 +0300 |
commit | 335a2a1fcefc948927e8c15636d9dc5d983b8f50 (patch) | |
tree | acef43b1106c46e7f049cece58bd3df52b879081 /net/ipv4 | |
parent | ea89c862f01e02ec459932c7c3113fa37aedd09a (diff) | |
download | linux-335a2a1fcefc948927e8c15636d9dc5d983b8f50.tar.xz |
esp: drop unneeded assignment in esp4_gro_receive()
Making '!=' operation with 0 directly after calling
the function xfrm_parse_spi() is more efficient,
assignment to err is redundant.
Eliminate the following clang_analyzer warning:
net/ipv4/esp4_offload.c:41:7: warning: Although the value stored to
'err' is used in the enclosing expression, the value is never actually
read from 'err'
No functional change, only more efficient.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/esp4_offload.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/esp4_offload.c b/net/ipv4/esp4_offload.c index 33687cf58286..be019a1fe3af 100644 --- a/net/ipv4/esp4_offload.c +++ b/net/ipv4/esp4_offload.c @@ -33,12 +33,11 @@ static struct sk_buff *esp4_gro_receive(struct list_head *head, struct xfrm_state *x; __be32 seq; __be32 spi; - int err; if (!pskb_pull(skb, offset)) return NULL; - if ((err = xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq)) != 0) + if (xfrm_parse_spi(skb, IPPROTO_ESP, &spi, &seq) != 0) goto out; xo = xfrm_offload(skb); |