diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-25 10:03:41 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-07-25 10:03:41 +0900 |
commit | a45704f808846cc7e95a624e8b595e4c20a48810 (patch) | |
tree | 6763656768a6de7d9ab16dca83f183ee79a6fc0d /ext | |
parent | 1c58abdad0b9e4ed5e668960e4f4496d5929f501 (diff) | |
download | ruby-openssl-a45704f808846cc7e95a624e8b595e4c20a48810.tar.gz |
Remove unnecessary usage of _() macro
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl.c | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_asn1.c | 6 | ||||
-rw-r--r-- | ext/openssl/ossl_bio.c | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_pkcs12.c | 6 | ||||
-rw-r--r-- | ext/openssl/ossl_pkey_dsa.c | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_pkey_rsa.c | 4 | ||||
-rw-r--r-- | ext/openssl/ossl_ssl.c | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c index 1cd59e59..94cc1405 100644 --- a/ext/openssl/ossl.c +++ b/ext/openssl/ossl.c @@ -77,7 +77,7 @@ STACK_OF(type) * \ ossl_protect_##name##_ary2sk(VALUE ary, int *status) \ { \ return (STACK_OF(type)*)rb_protect( \ - (VALUE(*)_((VALUE)))ossl_##name##_ary2sk0, \ + (VALUE (*)(VALUE))ossl_##name##_ary2sk0, \ ary, \ status); \ } \ @@ -136,7 +136,7 @@ ossl_buf2str(char *buf, int len) VALUE str; int status = 0; - str = rb_protect((VALUE(*)_((VALUE)))ossl_str_new, len, &status); + str = rb_protect((VALUE (*)(VALUE))ossl_str_new, len, &status); if(!NIL_P(str)) memcpy(RSTRING_PTR(str), buf, len); OPENSSL_free(buf); if(status) rb_jump_tag(status); diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index eb48aa5b..5fea9a2f 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -383,7 +383,7 @@ decode_int(unsigned char* der, long length) p = der; if(!(ai = d2i_ASN1_INTEGER(NULL, &p, length))) ossl_raise(eASN1Error, NULL); - ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num, + ret = rb_protect((VALUE (*)(VALUE))asn1integer_to_num, (VALUE)ai, &status); ASN1_INTEGER_free(ai); if(status) rb_jump_tag(status); @@ -423,7 +423,7 @@ decode_enum(unsigned char* der, long length) p = der; if(!(ai = d2i_ASN1_ENUMERATED(NULL, &p, length))) ossl_raise(eASN1Error, NULL); - ret = rb_protect((VALUE(*)_((VALUE)))asn1integer_to_num, + ret = rb_protect((VALUE (*)(VALUE))asn1integer_to_num, (VALUE)ai, &status); ASN1_ENUMERATED_free(ai); if(status) rb_jump_tag(status); @@ -485,7 +485,7 @@ decode_time(unsigned char* der, long length) p = der; if(!(time = d2i_ASN1_TIME(NULL, &p, length))) ossl_raise(eASN1Error, NULL); - ret = rb_protect((VALUE(*)_((VALUE)))asn1time_to_time, + ret = rb_protect((VALUE (*)(VALUE))asn1time_to_time, (VALUE)time, &status); ASN1_TIME_free(time); if(status) rb_jump_tag(status); diff --git a/ext/openssl/ossl_bio.c b/ext/openssl/ossl_bio.c index cd258264..feaf2296 100644 --- a/ext/openssl/ossl_bio.c +++ b/ext/openssl/ossl_bio.c @@ -51,7 +51,7 @@ BIO * ossl_protect_obj2bio(VALUE obj, int *status) { BIO *ret = NULL; - ret = (BIO*)rb_protect((VALUE(*)_((VALUE)))ossl_obj2bio, obj, status); + ret = (BIO*)rb_protect((VALUE (*)(VALUE))ossl_obj2bio, obj, status); return ret; } @@ -70,7 +70,7 @@ ossl_membio2str0(BIO *bio) VALUE ossl_protect_membio2str(BIO *bio, int *status) { - return rb_protect((VALUE(*)_((VALUE)))ossl_membio2str0, (VALUE)bio, status); + return rb_protect((VALUE (*)(VALUE))ossl_membio2str0, (VALUE)bio, status); } VALUE diff --git a/ext/openssl/ossl_pkcs12.c b/ext/openssl/ossl_pkcs12.c index 43fc5e51..9ad43c82 100644 --- a/ext/openssl/ossl_pkcs12.c +++ b/ext/openssl/ossl_pkcs12.c @@ -171,14 +171,14 @@ ossl_pkcs12_initialize(int argc, VALUE *argv, VALUE self) if(!PKCS12_parse(pkcs, passphrase, &key, &x509, &x509s)) ossl_raise(ePKCS12Error, "PKCS12_parse"); ERR_pop_to_mark(); - pkey = rb_protect((VALUE(*)_((VALUE)))ossl_pkey_new, (VALUE)key, + pkey = rb_protect((VALUE (*)(VALUE))ossl_pkey_new, (VALUE)key, &st); /* NO DUP */ if(st) goto err; - cert = rb_protect((VALUE(*)_((VALUE)))ossl_x509_new, (VALUE)x509, &st); + cert = rb_protect((VALUE (*)(VALUE))ossl_x509_new, (VALUE)x509, &st); if(st) goto err; if(x509s){ ca = - rb_protect((VALUE(*)_((VALUE)))ossl_x509_sk2ary, (VALUE)x509s, &st); + rb_protect((VALUE (*)(VALUE))ossl_x509_sk2ary, (VALUE)x509s, &st); if(st) goto err; } diff --git a/ext/openssl/ossl_pkey_dsa.c b/ext/openssl/ossl_pkey_dsa.c index 7c08620c..8787e02f 100644 --- a/ext/openssl/ossl_pkey_dsa.c +++ b/ext/openssl/ossl_pkey_dsa.c @@ -387,14 +387,14 @@ static VALUE ossl_dsa_to_der(VALUE self) { DSA *dsa; - int (*i2d_func)_((DSA*, unsigned char**)); + int (*i2d_func)(DSA *, unsigned char **); unsigned char *p; long len; VALUE str; GetDSA(self, dsa); if(DSA_HAS_PRIVATE(dsa)) - i2d_func = (int(*)_((DSA*,unsigned char**)))i2d_DSAPrivateKey; + i2d_func = (int (*)(DSA *,unsigned char **))i2d_DSAPrivateKey; else i2d_func = i2d_DSA_PUBKEY; if((len = i2d_func(dsa, NULL)) <= 0) diff --git a/ext/openssl/ossl_pkey_rsa.c b/ext/openssl/ossl_pkey_rsa.c index 18507ebb..e003d9ff 100644 --- a/ext/openssl/ossl_pkey_rsa.c +++ b/ext/openssl/ossl_pkey_rsa.c @@ -383,7 +383,7 @@ static VALUE ossl_rsa_to_der(VALUE self) { RSA *rsa; - int (*i2d_func)_((const RSA*, unsigned char**)); + int (*i2d_func)(const RSA *, unsigned char **); unsigned char *p; long len; VALUE str; @@ -392,7 +392,7 @@ ossl_rsa_to_der(VALUE self) if (RSA_HAS_PRIVATE(rsa)) i2d_func = i2d_RSAPrivateKey; else - i2d_func = (int (*)(const RSA*, unsigned char**))i2d_RSA_PUBKEY; + i2d_func = (int (*)(const RSA *, unsigned char **))i2d_RSA_PUBKEY; if((len = i2d_func(rsa, NULL)) <= 0) ossl_raise(eRSAError, NULL); str = rb_str_new(0, len); diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c index 7ac99247..a24bf9f6 100644 --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -462,7 +462,7 @@ ossl_sslctx_session_remove_cb(SSL_CTX *ctx, SSL_SESSION *sess) rb_ary_push(ary, sslctx_obj); rb_ary_push(ary, sess_obj); - rb_protect((VALUE(*)_((VALUE)))ossl_call_session_remove_cb, ary, &state); + rb_protect(ossl_call_session_remove_cb, ary, &state); if (state) { /* the SSL_CTX is frozen, nowhere to save state. @@ -538,7 +538,7 @@ ssl_servername_cb(SSL *ssl, int *ad, void *arg) rb_ary_push(ary, ssl_obj); rb_ary_push(ary, rb_str_new2(servername)); - rb_protect((VALUE(*)_((VALUE)))ossl_call_servername_cb, ary, &state); + rb_protect(ossl_call_servername_cb, ary, &state); if (state) { rb_ivar_set(ssl_obj, ID_callback_state, INT2NUM(state)); return SSL_TLSEXT_ERR_ALERT_FATAL; |