summaryrefslogtreecommitdiff
path: root/ext/openssl
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:28:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-20 09:28:33 +0000
commit026518c8e58c726668c875a0fabc42747ede17d8 (patch)
tree95e6e00ffe97b02b7d69997d9ed16306eba04635 /ext/openssl
parentf1f05e75cdae18a022aea39a4011c18d9f513c97 (diff)
ossl.c: RTEST
* ext/openssl/ossl.c (ossl_fips_mode_set): do not assume RTEST() to be parenthesized always. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl')
-rw-r--r--ext/openssl/ossl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c
index 1fae594..df63294 100644
--- a/ext/openssl/ossl.c
+++ b/ext/openssl/ossl.c
@@ -442,7 +442,7 @@ ossl_fips_mode_set(VALUE self, VALUE enabled)
{
#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 enabled)
}
return enabled;
#else
- if RTEST(enabled)
+ if (RTEST(enabled))
ossl_raise(eOSSLError, "This version of OpenSSL does not support FIPS mode");
return enabled;
#endif