summaryrefslogtreecommitdiff
path: root/validat1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'validat1.cpp')
-rw-r--r--validat1.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/validat1.cpp b/validat1.cpp
index 9b1bd8e3..b3abc879 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -3262,7 +3262,7 @@ bool ValidateEncoder()
// string of '*'. To round trip a string both IsolatedInitialize
// must be called and work correctly.
std::cout << "\nCustom encoder validation running...\n\n";
- bool pass1 = true, pass2 = false;
+ bool pass = true;
int lookup[256];
const char alphabet[64+1] =
@@ -3292,10 +3292,10 @@ bool ValidateEncoder()
decoder.Put((const byte*) str1.data(), str1.size());
decoder.MessageEnd();
- pass1 = (str1 == std::string(expected)) && pass1;
- pass1 = (str2 == std::string(alphabet, 64)) && pass1;
+ pass = (str1 == std::string(expected)) && pass;
+ pass = (str2 == std::string(alphabet, 64)) && pass;
- std::cout << (pass1 ? "passed:" : "FAILED:");
+ std::cout << (pass ? "passed:" : "FAILED:");
std::cout << " Encode and decode\n";
// Try forcing an empty message. This is the Monero bug
@@ -3315,14 +3315,11 @@ bool ValidateEncoder()
volatile lword size = decoder2.MaxRetrievable();
lword shadow = size;
CRYPTOPP_UNUSED(shadow);
-
- pass2 = true;
}
- std::cout << (pass2 ? "passed:" : "FAILED:");
- std::cout << " 0-length message\n";
+ std::cout << "passed: 0-length message\n";
- return pass1 && pass2;
+ return pass;
}
bool ValidateSHACAL2()