From 7153434fae45a6b554bbefebb572e777b6ffb21d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Mon, 18 Dec 2017 13:23:46 +0100 Subject: [PATCH] crypto: reuse variable instead of reevaluation PR-URL: https://github.com/nodejs/node/pull/17735 Reviewed-By: Colin Ihrig Reviewed-By: Daniel Bevenius Reviewed-By: Jon Moss Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- src/node_crypto.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4387416581a559..7e7222996f941d 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3669,7 +3669,7 @@ void CipherBase::Init(const char* cipher_type, nullptr, reinterpret_cast(key), reinterpret_cast(iv), - kind_ == kCipher); + encrypt); } @@ -3738,7 +3738,7 @@ void CipherBase::InitIv(const char* cipher_type, nullptr, reinterpret_cast(key), reinterpret_cast(iv), - kind_ == kCipher); + encrypt); }