src: rename return var in VerifySpkac functions

This commit renames the verification result variable, that is currently
named i, to verify_result.

PR-URL: https://github.com/nodejs/node/pull/20218
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Daniel Bevenius authored and Myles Borins committed 2018-05-04 11:47:53 -04:00
1 parent a4dae6c226
commit bd2e521096
1 file changed
+7 -7
+7 -7
View File
@@ -5148,7 +5148,7 @@ void GetCurves(const FunctionCallbackInfo<Value>& args) {
bool VerifySpkac(const char* data, unsigned int len) {
bool i = false;
bool verify_result = false;
EVP_PKEY* pkey = nullptr;
NETSCAPE_SPKI* spki = nullptr;
@@ -5160,7 +5160,7 @@ bool VerifySpkac(const char* data, unsigned int len) {
if (pkey == nullptr)
goto exit;
i = NETSCAPE_SPKI_verify(spki, pkey) > 0;
verify_result = NETSCAPE_SPKI_verify(spki, pkey) > 0;
exit:
if (pkey != nullptr)
@@ -5169,23 +5169,23 @@ bool VerifySpkac(const char* data, unsigned int len) {
if (spki != nullptr)
NETSCAPE_SPKI_free(spki);
return i;
return verify_result;
}
void VerifySpkac(const FunctionCallbackInfo<Value>& args) {
bool i = false;
bool verify_result = false;
size_t length = Buffer::Length(args[0]);
if (length == 0)
return args.GetReturnValue().Set(i);
return args.GetReturnValue().Set(verify_result);
char* data = Buffer::Data(args[0]);
CHECK_NE(data, nullptr);
i = VerifySpkac(data, length);
verify_result = VerifySpkac(data, length);
args.GetReturnValue().Set(i);
args.GetReturnValue().Set(verify_result);
}