Skip to content

Commit 7153434

Browse files
tniessenMylesBorins
authored andcommitted
crypto: reuse variable instead of reevaluation
PR-URL: #17735 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Daniel Bevenius <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 99c62cc commit 7153434

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -3669,7 +3669,7 @@ void CipherBase::Init(const char* cipher_type,
36693669
nullptr,
36703670
reinterpret_cast<unsigned char*>(key),
36713671
reinterpret_cast<unsigned char*>(iv),
3672-
kind_ == kCipher);
3672+
encrypt);
36733673
}
36743674

36753675

@@ -3738,7 +3738,7 @@ void CipherBase::InitIv(const char* cipher_type,
37383738
nullptr,
37393739
reinterpret_cast<const unsigned char*>(key),
37403740
reinterpret_cast<const unsigned char*>(iv),
3741-
kind_ == kCipher);
3741+
encrypt);
37423742
}
37433743

37443744

0 commit comments

Comments
 (0)