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 --- fpemulation.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'fpemulation.c') diff --git a/fpemulation.c b/fpemulation.c index 2a0d849..ac92099 100644 --- a/fpemulation.c +++ b/fpemulation.c @@ -40,7 +40,6 @@ static void SetupCPUEmFloatArrays(InternalFPF *abase, InternalFPF *bbase); double DoEmFloat(void) { - const char* context = "CPU:Floating Emulation"; InternalFPF* abase = NULL; InternalFPF* bbase = NULL; InternalFPF* cbase = NULL; @@ -50,26 +49,10 @@ DoEmFloat(void) static long loops = 1; abase = malloc(ARRAY_SIZE * sizeof(InternalFPF)); - if (!abase) { - printf("ERROR CONDITION\nContext: %s\n", context); - exit(1); - } - bbase = malloc(ARRAY_SIZE * sizeof(InternalFPF)); - if (!bbase) { - printf("ERROR CONDITION\nContext: %s\n", context); - free(abase); - exit(1); - } cbase = malloc(ARRAY_SIZE * sizeof(InternalFPF)); - if (!cbase) { - printf("ERROR CONDITION\nContext: %s\n", context); - free(abase); - free(bbase); - exit(1); - } SetupCPUEmFloatArrays(abase, bbase); /* FIXME: ugly */ -- cgit v1.2.3