Skip to content

Commit 16bf5fe

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 d02b72e commit 16bf5fe

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
@@ -3449,7 +3449,7 @@ void CipherBase::Init(const char* cipher_type,
34493449
nullptr,
34503450
reinterpret_cast<unsigned char*>(key),
34513451
reinterpret_cast<unsigned char*>(iv),
3452-
kind_ == kCipher);
3452+
encrypt);
34533453
}
34543454

34553455

@@ -3518,7 +3518,7 @@ void CipherBase::InitIv(const char* cipher_type,
35183518
nullptr,
35193519
reinterpret_cast<const unsigned char*>(key),
35203520
reinterpret_cast<const unsigned char*>(iv),
3521-
kind_ == kCipher);
3521+
encrypt);
35223522
}
35233523

35243524

0 commit comments

Comments
 (0)