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");