Skip to content

Commit 7153434

Browse files
tniessenMylesBorins
authored andcommittedJan 9, 2018
crypto: reuse variable instead of reevaluation
PR-URL: #17735 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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)
Please sign in to comment.