From 643f90d8db0a10c86ba5922fc48731d06edfcf6b Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 24 Mar 2011 04:49:18 +0000 Subject: * ext/openssl/ossl_rand.c (ossl_rand_egd_bytes): use NUM2INT because the result is used with functions whose argument is int. * ext/openssl/ossl_ssl.c (ossl_sslctx_setup): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509store_set_trust): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_purpose): ditto. * ext/openssl/ossl_x509store.c (ossl_x509stctx_set_trust): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509store.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/openssl/ossl_x509store.c') diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index e7856485ca..5d341c5192 100644 --- a/ext/openssl/ossl_x509store.c +++ b/ext/openssl/ossl_x509store.c @@ -170,7 +170,7 @@ ossl_x509store_set_purpose(VALUE self, VALUE purpose) { #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) X509_STORE *store; - long p = NUM2LONG(purpose); + int p = NUM2INT(purpose); GetX509Store(self, store); X509_STORE_set_purpose(store, p); @@ -186,7 +186,7 @@ ossl_x509store_set_trust(VALUE self, VALUE trust) { #if (OPENSSL_VERSION_NUMBER >= 0x00907000L) X509_STORE *store; - long t = NUM2LONG(trust); + int t = NUM2INT(trust); GetX509Store(self, store); X509_STORE_set_trust(store, t); @@ -526,7 +526,7 @@ static VALUE ossl_x509stctx_set_purpose(VALUE self, VALUE purpose) { X509_STORE_CTX *store; - long p = NUM2LONG(purpose); + int p = NUM2INT(purpose); GetX509StCtx(self, store); X509_STORE_CTX_set_purpose(store, p); @@ -538,7 +538,7 @@ static VALUE ossl_x509stctx_set_trust(VALUE self, VALUE trust) { X509_STORE_CTX *store; - long t = NUM2LONG(trust); + int t = NUM2INT(trust); GetX509StCtx(self, store); X509_STORE_CTX_set_trust(store, t); -- cgit v1.2.3