diff options
author | Matt Turner <mattst88@gmail.com> | 2008-11-14 23:12:20 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2008-11-14 23:12:20 +0000 |
commit | a899b2b196d749283a6b37f2d8c1ec1ba23ca860 (patch) | |
tree | aa3101b2a15865bea7944fc931e86de5d3828075 | |
parent | 34edabbf495e0222c59937973ab2bfecc8e32dd6 (diff) |
num_arrays should be static
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@45 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
-rw-r--r-- | assignment.c | 2 | ||||
-rw-r--r-- | linear.c | 3 | ||||
-rw-r--r-- | numsort.c | 2 | ||||
-rw-r--r-- | stringsort.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/assignment.c b/assignment.c index 26af1f7..78be3fa 100644 --- a/assignment.c +++ b/assignment.c @@ -74,7 +74,7 @@ DoAssign(void) long* array = NULL; clock_t total_time = 0; int iterations = 0; - int num_arrays = 1; + static int num_arrays = 1; static int is_adjusted = FALSE; if (is_adjusted == FALSE) { @@ -78,7 +78,7 @@ DoLU(void) LUdblptr ptra; int n; int i; - int num_arrays; + static int num_arrays = 0; static int is_adjusted = FALSE; /* @@ -112,7 +112,6 @@ DoLU(void) if (is_adjusted == FALSE) { is_adjusted = TRUE; - num_arrays=0; for(i=1;i<=MAXLUARRAYS;i++) { abase = realloc(abase, sizeof(double) * LUARRAYCOLS*LUARRAYROWS*(i+1)); @@ -35,7 +35,7 @@ DoNumSort (void) long* arraybase = NULL; clock_t total_time = 0; int iterations = 0; - int num_arrays = 1; + static int num_arrays = 1; static int is_adjusted = FALSE; if (is_adjusted == FALSE) { diff --git a/stringsort.c b/stringsort.c index 8c80e21..a91ff6d 100644 --- a/stringsort.c +++ b/stringsort.c @@ -52,7 +52,7 @@ void DoStringSort(void) unsigned char* arraybase = NULL; clock_t total_time = 0; int iterations = 0; - int num_arrays = 1; + static int num_arrays = 1; static int is_adjusted = FALSE; if (is_adjusted == FALSE) { |