summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/ossl_engine.c')
-rw-r--r--ext/openssl/ossl_engine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/openssl/ossl_engine.c b/ext/openssl/ossl_engine.c
index 91025941b91..71ab373223d 100644
--- a/ext/openssl/ossl_engine.c
+++ b/ext/openssl/ossl_engine.c
@@ -253,9 +253,10 @@ static VALUE
ossl_engine_set_default(VALUE self, VALUE flag)
{
ENGINE *e;
+ int f = NUM2INT(flag);
GetEngine(self, e);
- ENGINE_set_default(e, NUM2INT(flag));
+ ENGINE_set_default(e, f);
return Qtrue;
}