From 04137688c766b7c548fa93cd7c60a3afda8a66a1 Mon Sep 17 00:00:00 2001
From: David Kaufmann <astra@fsinf.at>
Date: Fri, 13 Jan 2012 19:07:11 +0100
Subject: [PATCH] fix bugs

---
 openmp/prefix/algorithm_2.c | 1 -
 openmp/prefix/algorithm_3.c | 1 -
 openmp/prefix/prefix.c      | 9 ++++-----
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/openmp/prefix/algorithm_2.c b/openmp/prefix/algorithm_2.c
index 633c8c7..0dafd6b 100644
--- a/openmp/prefix/algorithm_2.c
+++ b/openmp/prefix/algorithm_2.c
@@ -4,5 +4,4 @@
 #include "algorithm_2.h"
 
 void algorithm_2 (numtype y[], unsigned int n, unsigned int ops[]) {
-	return 0;
 }
diff --git a/openmp/prefix/algorithm_3.c b/openmp/prefix/algorithm_3.c
index 1a86a3e..312dea8 100644
--- a/openmp/prefix/algorithm_3.c
+++ b/openmp/prefix/algorithm_3.c
@@ -4,5 +4,4 @@
 #include "algorithm_3.h"
 
 void algorithm_3 (numtype y[], unsigned int n, unsigned int ops[]) {
-	return 0;
 }
diff --git a/openmp/prefix/prefix.c b/openmp/prefix/prefix.c
index ca6948e..b5e9b44 100644
--- a/openmp/prefix/prefix.c
+++ b/openmp/prefix/prefix.c
@@ -8,7 +8,6 @@
 #define NUMBERS 104857500
 
 int main (int argc, char* argv[]) {
-	int result = 0;
 	numtype numarray[NUMBERS];
 	//unsigned int countarray[NUMBERS];
 	int i;
@@ -28,15 +27,15 @@ int main (int argc, char* argv[]) {
 	
 	startTime = omp_get_wtime();
 	printf ("calling algorithm 2:");
-	result = algorithm_2(numarray, NUMBERS, NULL);
-	printf ("sum: %i\n", result);
+	algorithm_2(numarray, NUMBERS, NULL);
+	printf ("sum: %i\n", numarray[NUMBERS-1]);
 	endTime = omp_get_wtime();
 	printf("took %f seconds.\n", endTime-startTime);
 	
 	startTime = omp_get_wtime();
 	printf ("calling algorithm 3:");
-	result = algorithm_3(numarray, NUMBERS, NULL);
-	printf ("sum: %i\n", result);
+	algorithm_3(numarray, NUMBERS, NULL);
+	printf ("sum: %i\n", numarray[NUMBERS-1]);
 	endTime = omp_get_wtime();
 	printf("took %f seconds.\n", endTime-startTime);
 	
-- 
2.43.0