summaryrefslogtreecommitdiff
path: root/numsort.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2008-11-15 05:23:15 +0000
committerMatt Turner <mattst88@gmail.com>2008-11-15 05:23:15 +0000
commit0a0699aba70c04e3e6c5847b47cee75025e96255 (patch)
tree1f56669779fd2d69b6802b9eae52ee89a20bc381 /numsort.c
parent991b62808450c54ac721f345d82426fde3e6289f (diff)
Use stdbool.h, bool, true, false instead of manually defining
git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@60 0d43b9a7-5ab2-4d7b-af9d-f64450cef757
Diffstat (limited to 'numsort.c')
-rw-r--r--numsort.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/numsort.c b/numsort.c
index e997707..46eb432 100644
--- a/numsort.c
+++ b/numsort.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
+#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <limits.h>
@@ -21,7 +22,7 @@
** The following constant NUMARRAYSIZE determines the
** default # of elements in each numeric array
*/
-#define ARRAY_SIZE 8111L
+#define ARRAY_SIZE 8111
static clock_t DoNumSortIteration(long *array, unsigned int num_arrays);
static void LoadNumArrayWithRand(long *array, unsigned int num_arrays);
@@ -44,10 +45,10 @@ DoNumSort (void)
clock_t total_time = 0;
int iterations = 0;
static int num_arrays = 1;
- static int is_adjusted = FALSE;
+ static bool is_adjusted = false;
- if (is_adjusted == FALSE) {
- is_adjusted = TRUE;
+ if (is_adjusted == false) {
+ is_adjusted = true;
/*
** Self-is_adjustedment code. The system begins by sorting 1
** array. If it does that in no time, then two arrays