summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-17 00:55:40 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-17 00:55:40 +0000
commit129d2f71d495c61bf4284d7a721794119a65f0b3 (patch)
tree7e8f3192de5640df7a1a8328d6ca479e5a82c9dc
parent625ae827c8d413473ee957e7f07b9f67120a9678 (diff)
Convert for-if-break construct to do while
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@72 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
-rw-r--r--idea.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/idea.c b/idea.c
index 19d5faa..ffa51ac 100644
--- a/idea.c
+++ b/idea.c
@@ -137,11 +137,9 @@ DoIDEA(void)
** # of loops and increasing the loop count until we
** get a number of loops that we can use.
*/
- for (; loops < LOOP_MAX; loops += 10) {
- if (DoIDEAIteration(plain1, crypt1, plain2, loops, Z, DK) > MINIMUM_TICKS) {
- break;
- }
- }
+ do {
+ loops += 10;
+ } while((DoIDEAIteration(plain1, crypt1, plain2, loops, Z, DK) <= MINIMUM_TICKS) && (loops < LOOP_MAX));
}
/*