]> Git Repo - linux.git/commitdiff
esp: Simplify the calculation of variables
authorJiapeng Chong <[email protected]>
Wed, 3 Feb 2021 02:44:30 +0000 (10:44 +0800)
committerSteffen Klassert <[email protected]>
Thu, 4 Feb 2021 08:29:26 +0000 (09:29 +0100)
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 <[email protected]>
Signed-off-by: Jiapeng Chong <[email protected]>
Signed-off-by: Steffen Klassert <[email protected]>
net/ipv6/esp6.c

index 52c2f063529fbf9e33326eb6d3887f8c810b26eb..53eb76b1e708656a9d38c5b8ddd7846845be6b86 100644 (file)
@@ -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))
This page took 0.058011 seconds and 4 git commands to generate.