Skip to content

Commit

Permalink
crypto: reuse variable instead of reevaluation
Browse files Browse the repository at this point in the history
PR-URL: nodejs#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>
  • Loading branch information
tniessen committed Mar 4, 2018
1 parent fdf73b1 commit 1e2b5f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3372,7 +3372,7 @@ void CipherBase::Init(const char* cipher_type,
nullptr,
reinterpret_cast<unsigned char*>(key),
reinterpret_cast<unsigned char*>(iv),
kind_ == kCipher);
encrypt);
initialised_ = true;
}

Expand Down Expand Up @@ -3440,7 +3440,7 @@ void CipherBase::InitIv(const char* cipher_type,
nullptr,
reinterpret_cast<const unsigned char*>(key),
reinterpret_cast<const unsigned char*>(iv),
kind_ == kCipher);
encrypt);
initialised_ = true;
}

Expand Down

0 comments on commit 1e2b5f0

Please sign in to comment.