summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-11-21 08:27:46 -0500
committerRich Salz <rsalz@openssl.org>2015-11-30 16:10:12 -0500
commitd59c7c81e3850dc667d61047850c3b6936eb5fca (patch)
treec658a298cab7e2dce4d6c8d24c38fabc60ad8010 /crypto/bn/bn_lib.c
parent30c7fea496083d41b809db0041e6dfd3ea9cb858 (diff)
Remove BN_init
Rename it to be an internal function bn_init. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 4a6480ba97..b9e96b553e 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -265,9 +265,11 @@ void BN_free(BIGNUM *a)
}
}
-void BN_init(BIGNUM *a)
+void bn_init(BIGNUM *a)
{
- memset(a, 0, sizeof(*a));
+ static BIGNUM nilbn;
+
+ *a = nilbn;
bn_check_top(a);
}