summaryrefslogtreecommitdiff
path: root/lang/ruby18-base/patches/patch-dt
blob: 8c5d784342a428f5fca6cba576edc43ca75f713e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-dt,v 1.2 2010/09/10 03:29:00 taca Exp $

* r18172: suppress warnings.
* r26838: backport the commit from trunk.

--- ext/openssl/ossl_x509crl.c.orig	2010-06-21 09:18:59.000000000 +0000
+++ ext/openssl/ossl_x509crl.c
@@ -91,7 +91,7 @@ static VALUE 
 ossl_x509crl_initialize(int argc, VALUE *argv, VALUE self)
 {
     BIO *in;
-    X509_CRL *crl;
+    X509_CRL *crl, *x = DATA_PTR(self);
     VALUE arg;
 
     if (rb_scan_args(argc, argv, "01", &arg) == 0) {
@@ -99,10 +99,12 @@ ossl_x509crl_initialize(int argc, VALUE 
     }
     arg = ossl_to_der_if_possible(arg);
     in = ossl_obj2bio(arg);
-    crl = PEM_read_bio_X509_CRL(in, (X509_CRL **)&DATA_PTR(self), NULL, NULL);
+    crl = PEM_read_bio_X509_CRL(in, &x, NULL, NULL);
+    DATA_PTR(self) = x;
     if (!crl) {
-	BIO_reset(in);
-	crl = d2i_X509_CRL_bio(in, (X509_CRL **)&DATA_PTR(self));
+	(void)BIO_reset(in);
+	crl = d2i_X509_CRL_bio(in, &x);
+	DATA_PTR(self) = x;
     }
     BIO_free(in);
     if (!crl) ossl_raise(eX509CRLError, NULL);