projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Clean up RAND_bytes() calls
[openssl.git]
/
crypto
/
bn
/
bn_rand.c
diff --git
a/crypto/bn/bn_rand.c
b/crypto/bn/bn_rand.c
index 1dd07e789c96d8d0090111f39abb145166c36104..9c0a4eef06fedc22a3ebb7ee8ccb1c38e6f37863 100644
(file)
--- a/
crypto/bn/bn_rand.c
+++ b/
crypto/bn/bn_rand.c
@@
-44,13
+44,8
@@
static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
time(&tim);
RAND_add(&tim, sizeof(tim), 0.0);
- if (pseudorand) {
- if (RAND_bytes(buf, bytes) <= 0)
- goto err;
- } else {
- if (RAND_bytes(buf, bytes) <= 0)
- goto err;
- }
+ if (RAND_bytes(buf, bytes) <= 0)
+ goto err;
if (pseudorand == 2) {
/*