1
0

template.c: fix conditional compilation

This commit is contained in:
Intel A80486DX2-66 2024-01-10 04:17:54 +03:00
parent d326f32193
commit 8244326d22
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B

View File

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