From 34edabbf495e0222c59937973ab2bfecc8e32dd6 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 14 Nov 2008 23:03:36 +0000 Subject: Remove adjust struct member in favor of a local static variable git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@44 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- fpemulation.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fpemulation.c') diff --git a/fpemulation.c b/fpemulation.c index 2fca455..234c1ec 100644 --- a/fpemulation.c +++ b/fpemulation.c @@ -36,6 +36,7 @@ DoEmFloat(void) clock_t total_time = 0; int iterations = 0; unsigned long loops = 1; + static int is_adjusted = FALSE; abase = malloc(locemfloatstruct->arraysize * sizeof(InternalFPF)); if (!abase) { @@ -62,8 +63,8 @@ DoEmFloat(void) SetupCPUEmFloatArrays(abase, bbase, locemfloatstruct->arraysize); /* FIXME: ugly */ /* See if we need to do self-adjusting code.*/ - if (locemfloatstruct->adjust == FALSE) { - locemfloatstruct->adjust = TRUE; + if (is_adjusted == FALSE) { + is_adjusted = TRUE; locemfloatstruct->loops = 0; -- cgit v1.2.3