Skip to content

Commit b43a59c

Browse files
tniessenMylesBorins
authored andcommitted
crypto: reuse variable instead of reevaluation
Backport-PR-URL: #19114 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 d46fafc commit b43a59c

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
@@ -3565,7 +3565,7 @@ void CipherBase::Init(const char* cipher_type,
35653565
nullptr,
35663566
reinterpret_cast<unsigned char*>(key),
35673567
reinterpret_cast<unsigned char*>(iv),
3568-
kind_ == kCipher);
3568+
encrypt);
35693569
}
35703570

35713571

@@ -3634,7 +3634,7 @@ void CipherBase::InitIv(const char* cipher_type,
36343634
nullptr,
36353635
reinterpret_cast<const unsigned char*>(key),
36363636
reinterpret_cast<const unsigned char*>(iv),
3637-
kind_ == kCipher);
3637+
encrypt);
36383638
}
36393639

36403640

0 commit comments

Comments
 (0)