summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_rand.c
diff options
context:
space:
mode:
authorderaadt <>2014-06-07 14:41:57 +0000
committerderaadt <>2014-06-07 14:41:57 +0000
commit800fbde652d67326eeb163d56d8f72ebb239b3c4 (patch)
treec0956c22011ba4358ae4ab650adf0e744f93f40c /src/lib/libcrypto/bn/bn_rand.c
parent99e1482c930054f5a075761b96ee19aa8e1a4596 (diff)
downloadopenbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.tar.gz
openbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.tar.bz2
openbsd-800fbde652d67326eeb163d56d8f72ebb239b3c4.zip
malloc() result does not need a cast.
ok miod
Diffstat (limited to 'src/lib/libcrypto/bn/bn_rand.c')
-rw-r--r--src/lib/libcrypto/bn/bn_rand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c
index 488b7c6e63..0073eec35c 100644
--- a/src/lib/libcrypto/bn/bn_rand.c
+++ b/src/lib/libcrypto/bn/bn_rand.c
@@ -130,7 +130,7 @@ bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom)
130 bit = (bits - 1) % 8; 130 bit = (bits - 1) % 8;
131 mask = 0xff << (bit + 1); 131 mask = 0xff << (bit + 1);
132 132
133 buf = (unsigned char *)malloc(bytes); 133 buf = malloc(bytes);
134 if (buf == NULL) { 134 if (buf == NULL) {
135 BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE); 135 BNerr(BN_F_BNRAND, ERR_R_MALLOC_FAILURE);
136 goto err; 136 goto err;