OSDN Git Service

crypto: x86/des3 - remove redundant assignment of variable nbytes
authorColin Ian King <colin.i.king@gmail.com>
Tue, 7 Dec 2021 18:58:09 +0000 (18:58 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Dec 2021 05:59:46 +0000 (16:59 +1100)
The variable nbytes is being assigned a value that is never read, it is
being re-assigned in the following statement. The assignment is redundant
and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/des3_ede_glue.c

index e7cb68a..787c234 100644 (file)
@@ -164,7 +164,7 @@ static int cbc_encrypt(struct skcipher_request *req)
 
        err = skcipher_walk_virt(&walk, req, false);
 
-       while ((nbytes = walk.nbytes)) {
+       while (walk.nbytes) {
                nbytes = __cbc_encrypt(ctx, &walk);
                err = skcipher_walk_done(&walk, nbytes);
        }
@@ -243,7 +243,7 @@ static int cbc_decrypt(struct skcipher_request *req)
 
        err = skcipher_walk_virt(&walk, req, false);
 
-       while ((nbytes = walk.nbytes)) {
+       while (walk.nbytes) {
                nbytes = __cbc_decrypt(ctx, &walk);
                err = skcipher_walk_done(&walk, nbytes);
        }