lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Apr 2021 15:31:41 +0800
From:   Zhiqi Song <songzhiqi1@...wei.com>
To:     <herbert@...dor.apana.org.au>, <davem@...emloft.net>
CC:     <linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <wangzhou1@...ilicon.com>, <fanghao11@...wei.com>,
        <prime.zeng@...ilicon.com>
Subject: [PATCH] crypto: cbc - fix coding style

Fixed following checkpatch error:
- do not use assignment in if condition

Signed-off-by: Zhiqi Song <songzhiqi1@...wei.com>
---
 crypto/cbc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/cbc.c b/crypto/cbc.c
index 6c03e96..152d48d 100644
--- a/crypto/cbc.c
+++ b/crypto/cbc.c
@@ -140,7 +140,8 @@ static int crypto_cbc_decrypt_inplace(struct skcipher_walk *walk,
 
 	for (;;) {
 		fn(tfm, src, src);
-		if ((nbytes -= bsize) < bsize)
+		nbytes -= bsize;
+		if (nbytes < bsize)
 			break;
 		crypto_xor(src, src - bsize, bsize);
 		src -= bsize;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ