projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'lsk/v3.10/topic/arm64-cpu' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git]
/
crypto
/
ansi_cprng.c
diff --git
a/crypto/ansi_cprng.c
b/crypto/ansi_cprng.c
index c0bb3778f1ae06976fbaf07c7e1b075fc0c581e7..666f1962a160f5d547579b918b6229de0232607b 100644
(file)
--- a/
crypto/ansi_cprng.c
+++ b/
crypto/ansi_cprng.c
@@
-230,11
+230,11
@@
remainder:
*/
if (byte_count < DEFAULT_BLK_SZ) {
empty_rbuf:
*/
if (byte_count < DEFAULT_BLK_SZ) {
empty_rbuf:
- for (; ctx->rand_data_valid < DEFAULT_BLK_SZ;
- ctx->rand_data_valid++) {
+ while (ctx->rand_data_valid < DEFAULT_BLK_SZ) {
*ptr = ctx->rand_data[ctx->rand_data_valid];
ptr++;
byte_count--;
*ptr = ctx->rand_data[ctx->rand_data_valid];
ptr++;
byte_count--;
+ ctx->rand_data_valid++;
if (byte_count == 0)
goto done;
}
if (byte_count == 0)
goto done;
}