Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jiapeng Chong and committed by
Steffen Klassert
bf3da527 0c87b1ac

+1 -1
+1 -1
net/ipv6/esp6.c
··· 793 793 int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); 794 794 int hdr_len = skb_network_header_len(skb); 795 795 796 - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) 796 + if (!xo || !(xo->flags & CRYPTO_DONE)) 797 797 kfree(ESP_SKB_CB(skb)->tmp); 798 798 799 799 if (unlikely(err))