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 --- fourier.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'fourier.c') diff --git a/fourier.c b/fourier.c index 00b0ad0..81ec5b2 100644 --- a/fourier.c +++ b/fourier.c @@ -39,16 +39,14 @@ DoFourier(void) { const char* context = "FPU:Transcendental"; FourierStruct* locfourierstruct = &global_fourierstruct; - clock_t total_time = 0; - int iterations = 0; double* abase = NULL; double* bbase = NULL; + clock_t total_time = 0; + int iterations = 0; + static int is_adjusted = FALSE; - /* - ** See if we need to do self-adjustment code. - */ - if (locfourierstruct->adjust == FALSE) { - locfourierstruct->adjust = TRUE; + if (is_adjusted == FALSE) { + is_adjusted = TRUE; locfourierstruct->arraysize = 100L; /* Start at 100 elements */ while (1) { -- cgit v1.2.3