From 1e2b5f045d1690acb60c3211c29d0308d1d0bdd8 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 a439063c47bc10..85454bc296722a 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -3372,7 +3372,7 @@ void CipherBase::Init(const char* cipher_type, nullptr, reinterpret_cast(key), reinterpret_cast(iv), - kind_ == kCipher); + encrypt); initialised_ = true; } @@ -3440,7 +3440,7 @@ void CipherBase::InitIv(const char* cipher_type, nullptr, reinterpret_cast(key), reinterpret_cast(iv), - kind_ == kCipher); + encrypt); initialised_ = true; }