[前][次][番号順一覧][スレッド一覧]

ruby-changes:19652

From: emboss <ko1@a...>
Date: Mon, 23 May 2011 03:48:38 +0900 (JST)
Subject: [ruby-changes:19652] emboss:r31697 (trunk): * ext/openssl/ossl_asn1.c (ossl_asn1data_to_der): Remove redundant

emboss	2011-05-23 03:48:31 +0900 (Mon, 23 May 2011)

  New Revision: 31697

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31697

  Log:
    * ext/openssl/ossl_asn1.c (ossl_asn1data_to_der): Remove redundant
    flag tmp_cons.

  Modified files:
    trunk/ext/openssl/ossl_asn1.c

Index: ext/openssl/ossl_asn1.c
===================================================================
--- ext/openssl/ossl_asn1.c	(revision 31696)
+++ ext/openssl/ossl_asn1.c	(revision 31697)
@@ -721,7 +721,7 @@
 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 @@
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]