summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-10 09:15:21 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-04-10 09:15:21 +0000
commit25c1fd3b9037d9eb39596bb994eeabed812adada (patch)
treed50105485a5d01efee139d56b3c570561adfff97 /ext/openssl
parent0cc2ffbc1bf135a3b7a8656b9242e87b1ad96d6c (diff)
Reverting all commits from r67479 to r67496 because of CI failures
Because hard to specify commits related to r67479 only. So please commit again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl_bn.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/openssl/ossl_bn.c b/ext/openssl/ossl_bn.c
index 6f0064e966..4666ce6c2f 100644
--- a/ext/openssl/ossl_bn.c
+++ b/ext/openssl/ossl_bn.c
@@ -187,7 +187,6 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
BIGNUM *bn;
VALUE str, bs;
int base = 10;
- char *ptr;
if (rb_scan_args(argc, argv, "11", &str, &bs) == 2) {
base = NUM2INT(bs);
@@ -214,14 +213,12 @@ ossl_bn_initialize(int argc, VALUE *argv, VALUE self)
GetBN(self, bn);
switch (base) {
case 0:
- ptr = StringValuePtr(str);
- if (!BN_mpi2bn((unsigned char *)ptr, RSTRING_LENINT(str), bn)) {
+ if (!BN_mpi2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;
case 2:
- ptr = StringValuePtr(str);
- if (!BN_bin2bn((unsigned char *)ptr, RSTRING_LENINT(str), bn)) {
+ if (!BN_bin2bn((unsigned char *)StringValuePtr(str), RSTRING_LENINT(str), bn)) {
ossl_raise(eBNError, NULL);
}
break;