summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-29 18:15:50 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-29 18:15:50 +0000
commitc5ed8911f282a04b96d0f0241055542894dc2c9b (patch)
tree69d5c19c1217409d7807966bdc16ebe1518a75ee
parent5882ebbf6337c2424c26d1b16cccfa38b8e89337 (diff)
* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand):
Int should be enough here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/openssl/ossl_rand.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 94b5555157..225f9c17b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri May 30 03:12:18 2008 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand):
+ Int should be enough here.
+
Fri May 30 02:35:00 2008 Akinori MUSHA <knu@iDaemons.org>
* ext/openssl/ossl_bn.c (ossl_bn_s_rand, ossl_bn_s_pseudo_rand),
diff --git a/ext/openssl/ossl_rand.c b/ext/openssl/ossl_rand.c
index d9c1a7f34f..ad830fbc98 100644
--- a/ext/openssl/ossl_rand.c
+++ b/ext/openssl/ossl_rand.c
@@ -96,7 +96,7 @@ static VALUE
ossl_rand_bytes(VALUE self, VALUE len)
{
VALUE str;
- long n = NUM2INT(len);
+ int n = NUM2INT(len);
str = rb_str_new(0, n);
if (!RAND_bytes(RSTRING_PTR(str), n)) {
@@ -115,7 +115,7 @@ static VALUE
ossl_rand_pseudo_bytes(VALUE self, VALUE len)
{
VALUE str;
- long n = NUM2INT(len);
+ int n = NUM2INT(len);
str = rb_str_new(0, n);
if (!RAND_pseudo_bytes(RSTRING_PTR(str), n)) {