lkml.org 
[lkml]   [2021]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] crypto: cbc - fix coding style
Date
Fixed following checkpatch error:
- do not use assignment in if condition

Signed-off-by: Zhiqi Song <songzhiqi1@huawei.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
\
 
 \ /
  Last update: 2021-04-01 09:33    [W:0.036 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site