diff options
Diffstat (limited to 'src/crypto/bn_extra/convert.c')
-rw-r--r-- | src/crypto/bn_extra/convert.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/crypto/bn_extra/convert.c b/src/crypto/bn_extra/convert.c index c70ff8b5..9a1a69e3 100644 --- a/src/crypto/bn_extra/convert.c +++ b/src/crypto/bn_extra/convert.c @@ -367,17 +367,13 @@ end: } int BN_print_fp(FILE *fp, const BIGNUM *a) { - BIO *b; - int ret; - - b = BIO_new(BIO_s_file()); + BIO *b = BIO_new_fp(fp, BIO_NOCLOSE); if (b == NULL) { return 0; } - BIO_set_fp(b, fp, BIO_NOCLOSE); - ret = BN_print(b, a); - BIO_free(b); + int ret = BN_print(b, a); + BIO_free(b); return ret; } |