From b88d6d94f5a1b4b57501426e8c337675e58d60e4 Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Sun, 21 Jan 2024 15:04:55 +0300 Subject: [PATCH] fixup for ba855735fb --- src/template.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/template.c b/src/template.c index c368ba7..e6c528d 100644 --- a/src/template.c +++ b/src/template.c @@ -187,7 +187,7 @@ main(void) // 4. write sample data #if SEQUENTIAL_MODE - const size_t BLOCK_SIZE = BLOCK_SIZE_BYTES / (sizeof(SAMPLE_TYPE) / + size_t BLOCK_SIZE = BLOCK_SIZE_BYTES / (sizeof(SAMPLE_TYPE) / sizeof(uint8_t)); if (BLOCK_SIZE < 1) { printf("The block size %" PRIuMAX " is too small, should be at least " @@ -195,13 +195,8 @@ main(void) (uintmax_t) (sizeof(SAMPLE_TYPE) / sizeof(uint8_t))); exit(EXIT_FAILURE); } - const size_t MAX = -#if BLOCK_SIZE > 0 - (PRODUCT + (BLOCK_SIZE - 1)) / BLOCK_SIZE -#else - 0 -#endif - ; + + const size_t MAX = (PRODUCT + (BLOCK_SIZE - 1)) / BLOCK_SIZE; size_t w = 0; for (size_t seq = 0; seq < MAX; seq++) {