Skip to content

Commit

Permalink
esp: Simplify the calculation of variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiapeng Chong authored and Steffen Klassert committed Feb 4, 2021
1 parent 0c87b1a commit bf3da52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/esp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit bf3da52

Please sign in to comment.