Skip to content

Commit

Permalink
NO_ERROR -> OK (because MSVC has a NO_ERROR macro)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaisinTen committed Mar 11, 2021
1 parent 0386027 commit 6ff54c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/crypto/crypto_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ MaybeLocal<Value> CryptoErrorStore::ToException(
CryptoErrorStore copy(*this);
if (copy.Empty()) {
// But possibly a bug...
copy.Insert(NodeCryptoError::NO_ERROR);
copy.Insert(NodeCryptoError::OK);
}
// Use last element as the error message, everything else goes
// into the .opensslErrorStack property on the exception object.
Expand Down
6 changes: 3 additions & 3 deletions src/crypto/crypto_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ enum class NodeCryptoError {
ENGINE_NOT_FOUND,
INVALID_KEY_TYPE,
KEY_GENERATION_JOB_FAILED,
NO_ERROR
OK
};

// Utility struct used to harvest error information from openssl's error stack
Expand Down Expand Up @@ -209,8 +209,8 @@ void CryptoErrorStore::Insert(const NodeCryptoError error, Args&&... args) {
case NodeCryptoError::KEY_GENERATION_JOB_FAILED:
error_string = "Key generation failed";
break;
case NodeCryptoError::NO_ERROR:
error_string = "No error";
case NodeCryptoError::OK:
error_string = "Ok";
break;
}
errors_.emplace_back(SPrintF(error_string,
Expand Down

0 comments on commit 6ff54c7

Please sign in to comment.