Skip to content

Commit 0298f44

Browse files
committed
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 3bb6f07 commit 0298f44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/node_crypto.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,7 +3662,7 @@ void CipherBase::Init(const char* cipher_type,
36623662
nullptr,
36633663
reinterpret_cast<unsigned char*>(key),
36643664
reinterpret_cast<unsigned char*>(iv),
3665-
kind_ == kCipher);
3665+
encrypt);
36663666
}
36673667

36683668

@@ -3725,7 +3725,7 @@ void CipherBase::InitIv(const char* cipher_type,
37253725
nullptr,
37263726
reinterpret_cast<const unsigned char*>(key),
37273727
reinterpret_cast<const unsigned char*>(iv),
3728-
kind_ == kCipher);
3728+
encrypt);
37293729
}
37303730

37313731

0 commit comments

Comments
 (0)