summaryrefslogtreecommitdiff
path: root/bitfield.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-14 23:03:36 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-14 23:03:36 +0000
commit34edabbf495e0222c59937973ab2bfecc8e32dd6 (patch)
treecb3f1660f1fdac73e1f7281d25cb35b68a7db1aa /bitfield.c
parent7225b0865e8c7697fce69224640142374b22364d (diff)
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
Diffstat (limited to 'bitfield.c')
-rw-r--r--bitfield.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/bitfield.c b/bitfield.c
index 9a74b97..fcab172 100644
--- a/bitfield.c
+++ b/bitfield.c
@@ -37,17 +37,15 @@ DoBitops(void)
{
const char* context = "CPU:Bitfields";
BitOpStruct* locbitopstruct = &global_bitopstruct;
- clock_t total_time = 0;
- int iterations = 0;
unsigned long* bitarraybase = NULL;
unsigned long* bitoparraybase = NULL;
+ clock_t total_time = 0;
+ int iterations = 0;
unsigned long nbitops;
+ static int is_adjusted = FALSE;
- /*
- ** See if we need to run adjustment code.
- */
- if (locbitopstruct->adjust == FALSE) {
- locbitopstruct->adjust = TRUE;
+ if (is_adjusted == FALSE) {
+ is_adjusted = TRUE;
bitarraybase = realloc(bitarraybase, locbitopstruct->bitfieldarraysize * sizeof(unsigned long));
if (!bitarraybase) {