From 129d2f71d495c61bf4284d7a721794119a65f0b3 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 17 Nov 2008 00:55:40 +0000 Subject: Convert for-if-break construct to do while git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@72 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- idea.c | 8 +++----- 1 file 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)); } /* -- cgit v1.2.3