Skip to content

Commit 1353e57

Browse files
ColinIanKingherbertx
authored andcommitted
crypto: x86/blowfish - remove redundant assignment to variable nytes
Variable nbytes is being assigned a value that is never read, it is being re-assigned in the next statement in the while-loop. The assignment is redundant and can be removed. Cleans up clang scan-build warnings, e.g.: arch/x86/crypto/blowfish_glue.c:147:10: warning: Although the value stored to 'nbytes' is used in the enclosing expression, the value is never actually read from 'nbytes' Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent b77e34f commit 1353e57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/crypto/blowfish_glue.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int cbc_encrypt(struct skcipher_request *req)
144144

145145
err = skcipher_walk_virt(&walk, req, false);
146146

147-
while ((nbytes = walk.nbytes)) {
147+
while (walk.nbytes) {
148148
nbytes = __cbc_encrypt(ctx, &walk);
149149
err = skcipher_walk_done(&walk, nbytes);
150150
}
@@ -225,7 +225,7 @@ static int cbc_decrypt(struct skcipher_request *req)
225225

226226
err = skcipher_walk_virt(&walk, req, false);
227227

228-
while ((nbytes = walk.nbytes)) {
228+
while (walk.nbytes) {
229229
nbytes = __cbc_decrypt(ctx, &walk);
230230
err = skcipher_walk_done(&walk, nbytes);
231231
}

0 commit comments

Comments
 (0)