Break instead of returning

This commit is contained in:
Janek Bevendorff 2017-01-15 19:36:00 +01:00
parent 75dc21c66d
commit 4dab30ce6f
No known key found for this signature in database
GPG Key ID: CFEC2F6850BFFA53

View File

@ -169,13 +169,13 @@ void TestSymmetricCipher::testTwofish256CbcEncryption()
for (int j = 0; j < 5000; ++j) { for (int j = 0; j < 5000; ++j) {
ctCur = cipher.process(ptNext, &ok); ctCur = cipher.process(ptNext, &ok);
if (!ok) if (!ok)
return; break;
ptNext = ctPrev; ptNext = ctPrev;
ctPrev = ctCur; ctPrev = ctCur;
ctCur = cipher.process(ptNext, &ok); ctCur = cipher.process(ptNext, &ok);
if (!ok) if (!ok)
return; break;
ptNext = ctPrev; ptNext = ctPrev;
ctPrev = ctCur; ctPrev = ctCur;
} }
@ -230,12 +230,12 @@ void TestSymmetricCipher::testTwofish256CbcDecryption()
for (int j = 0; j < 5000; ++j) { for (int j = 0; j < 5000; ++j) {
ptCur = cipher.process(ctNext, &ok); ptCur = cipher.process(ctNext, &ok);
if (!ok) if (!ok)
return; break;
ctNext = ptCur; ctNext = ptCur;
ptCur = cipher.process(ctNext, &ok); ptCur = cipher.process(ctNext, &ok);
if (!ok) if (!ok)
return; break;
ctNext = ptCur; ctNext = ptCur;
} }