diff options
author | Jiapeng Chong <jiapeng.chong@linux.alibaba.com> | 2021-03-01 18:46:02 +0800 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2021-03-12 09:56:43 +0100 |
commit | 1d9bfacd52ece918b7861e205202912231ca6166 (patch) | |
tree | 3c135974f13ffba3c1d1a371c59d1ca1a6a1b751 /net/ipv4/esp4.c | |
parent | 34bb975126419e86bc3b95e200dc41de6c6ca69c (diff) | |
download | linux-1d9bfacd52ece918b7861e205202912231ca6166.tar.bz2 |
esp4: Simplify the calculation of variables
Fix the following coccicheck warnings:
./net/ipv4/esp4.c:757: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/ipv4/esp4.c')
-rw-r--r-- | net/ipv4/esp4.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index a3271ec3e162..804a7698df5b 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -754,7 +754,7 @@ int esp_input_done2(struct sk_buff *skb, int err) int hlen = sizeof(struct ip_esp_hdr) + crypto_aead_ivsize(aead); int ihl; - if (!xo || (xo && !(xo->flags & CRYPTO_DONE))) + if (!xo || !(xo->flags & CRYPTO_DONE)) kfree(ESP_SKB_CB(skb)->tmp); if (unlikely(err)) |