From e77a7cf98586aec347961d389d6157ca41bed2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 27 Feb 2022 15:05:34 +0100 Subject: [PATCH] src: simplify GetExponentString PR-URL: https://github.com/nodejs/node/pull/42121 Reviewed-By: Filip Skokan Reviewed-By: Darshan Sen --- src/crypto/crypto_common.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc index 97895f7c118d64..21713f3eb927ef 100644 --- a/src/crypto/crypto_common.cc +++ b/src/crypto/crypto_common.cc @@ -514,13 +514,7 @@ MaybeLocal GetExponentString( const BIOPointer& bio, const BIGNUM* e) { uint64_t exponent_word = static_cast(BN_get_word(e)); - uint32_t lo = static_cast(exponent_word); - uint32_t hi = static_cast(exponent_word >> 32); - if (hi == 0) - BIO_printf(bio.get(), "0x%x", lo); - else - BIO_printf(bio.get(), "0x%x%08x", hi, lo); - + BIO_printf(bio.get(), "0x%" PRIx64, exponent_word); return ToV8Value(env, bio); }