diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-02-03 10:44:30 +0800 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2021-02-04 09:29:26 +0100 |
commit | bf3da527bbc9f0a83a02f4ad3fb762eafdd63ba0 (patch) | |
tree | 9b64093b6ffe4bcbac79e89596c7c71fbbc91c39 /net/ipv6/esp6.c | |
parent | 0c87b1ac604518a0d3f527080c6883d5c2402fb4 (diff) |
esp: Simplify the calculation of variables
Fix the following coccicheck warnings:
./net/ipv6/esp6.c:791:16-18: WARNING !A || A && B is equivalent
to !A || B.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/ipv6/esp6.c')
-rw-r--r-- | net/ipv6/esp6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 52c2f063529f..53eb76b1e708 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -793,7 +793,7 @@ int esp6_input_done2(struct sk_buff *skb, int err) int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); int hdr_len = skb_network_header_len(skb); - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) + if (!xo || !(xo->flags & CRYPTO_DONE)) kfree(ESP_SKB_CB(skb)->tmp); if (unlikely(err)) |