From d064ec35868720e0f29c1fe53a6e688333e71736 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 17 Nov 2008 20:43:00 +0000 Subject: Remove malloc return checks. Since they're in loops, they don't prevent memory from being leaked after the first iteration. Plus, when does malloc fail? git-svn-id: svn://mattst88.com/svn/cleanbench/trunk@78 0d43b9a7-5ab2-4d7b-af9d-f64450cef757 --- stringsort.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'stringsort.c') diff --git a/stringsort.c b/stringsort.c index ed8c913..b38f5bd 100644 --- a/stringsort.c +++ b/stringsort.c @@ -52,7 +52,6 @@ static void strsift(unsigned long *optrarray, double DoStringSort(void) { - const char* context = "CPU:String Sort"; unsigned char* array = NULL; clock_t total_time = 0; int iterations = 0; @@ -72,10 +71,6 @@ DoStringSort(void) ** (this can happen during string adjustment) */ array = realloc(array, (ARRAY_SIZE + 100) * num_arrays); - if (!array) { - fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context); - exit(1); - } /* ** Do an iteration of the string sort. If the @@ -90,10 +85,6 @@ DoStringSort(void) ** Simply allocate the space for the array. */ array = malloc((ARRAY_SIZE + 100) * num_arrays); - if (!array) { - fprintf(stderr, "Error in %s, could not allocate memory. Exitting...\n", context); - exit(1); - } } do { @@ -247,11 +238,6 @@ while(k