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

ruby-changes:26446

From: nobu <ko1@a...>
Date: Thu, 20 Dec 2012 18:28:42 +0900 (JST)
Subject: [ruby-changes:26446] nobu:r38497 (trunk): ossl.c: RTEST

nobu	2012-12-20 18:28:33 +0900 (Thu, 20 Dec 2012)

  New Revision: 38497

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

  Log:
    ossl.c: RTEST
    
    * ext/openssl/ossl.c (ossl_fips_mode_set): do not assume RTEST() to be
      parenthesized always.

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

Index: ext/openssl/ossl.c
===================================================================
--- ext/openssl/ossl.c	(revision 38496)
+++ ext/openssl/ossl.c	(revision 38497)
@@ -442,7 +442,7 @@ ossl_fips_mode_set(VALUE self, VALUE ena https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L442
 {
 
 #ifdef HAVE_OPENSSL_FIPS
-    if RTEST(enabled) {
+    if (RTEST(enabled)) {
 	int mode = FIPS_mode();
 	if(!mode && !FIPS_mode_set(1)) /* turning on twice leads to an error */
 	    ossl_raise(eOSSLError, "Turning on FIPS mode failed");
@@ -452,7 +452,7 @@ ossl_fips_mode_set(VALUE self, VALUE ena https://github.com/ruby/ruby/blob/trunk/ext/openssl/ossl.c#L452
     }
     return enabled;
 #else
-    if RTEST(enabled)
+    if (RTEST(enabled))
 	ossl_raise(eOSSLError, "This version of OpenSSL does not support FIPS mode");
     return enabled;
 #endif

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

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