From 8244326d22cbd90102fabbcd50e251051c4903a7 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Wed, 10 Jan 2024 04:17:54 +0300 Subject: [PATCH] template.c: fix conditional compilation --- src/template.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/template.c b/src/template.c index 0b88c7a..c652795 100644 --- a/src/template.c +++ b/src/template.c @@ -199,13 +199,12 @@ main(void) size_t w = 0; for (size_t seq = 0; seq < MAX; seq++) { -#else - do { -#endif size_t calc_block_size = BLOCK_SIZE; if ((w + BLOCK_SIZE) >= PRODUCT) calc_block_size = PRODUCT - w; - +#else + do { +#endif // * allocate heap for sample data SAMPLE_TYPE* buffer = calloc( #if SEQUENTIAL_MODE @@ -314,10 +313,8 @@ main(void) fflush(output_file); #endif -#if SEQUENTIAL_MODE // * free allocated heap free(buffer); -#endif } #if !SEQUENTIAL_MODE while (0); @@ -326,11 +323,6 @@ main(void) // 6. close file fclose(output_file); -#if !SEQUENTIAL_MODE - // * free allocated heap - free(buffer); -#endif - // * end of program #if !SILENT_MODE printf("Done!\n");