From 9253bd7797461488245b466eabf6c018a9d0c24c Mon Sep 17 00:00:00 2001 From: emboss Date: Sun, 22 May 2011 18:48:31 +0000 Subject: * ext/openssl/ossl_asn1.c (ossl_asn1data_to_der): Remove redundant flag tmp_cons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_asn1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ext/openssl') diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index 920e9744bf..0f53ab3d97 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -721,7 +721,7 @@ static VALUE ossl_asn1data_to_der(VALUE self) { VALUE value, der, inf_length; - int tag, tag_class, is_cons = 0, tmp_cons = 1; + int tag, tag_class, is_cons = 0; long length; unsigned char *p; @@ -736,10 +736,9 @@ ossl_asn1data_to_der(VALUE self) tag_class = ossl_asn1_tag_class(self); inf_length = ossl_asn1_get_infinite_length(self); if (inf_length == Qtrue) { - is_cons = 2; - tmp_cons = 2; + is_cons = 2; } - if((length = ASN1_object_size(tmp_cons, RSTRING_LENINT(value), tag)) <= 0) + if((length = ASN1_object_size(is_cons, RSTRING_LENINT(value), tag)) <= 0) ossl_raise(eASN1Error, NULL); der = rb_str_new(0, length); p = (unsigned char *)RSTRING_PTR(der); -- cgit v1.2.3