template.c: ceil division result when finding minimum byte amount

This commit is contained in:
Intel A80486DX2-66 2024-04-14 16:09:37 +03:00
parent c6d6759ffc
commit 43e4b6f6a9
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B
1 changed files with 2 additions and 1 deletions

View File

@ -204,7 +204,8 @@ main(void)
if (BLOCK_SIZE < 1) {
printf("The block size %" PRIuMAX " is too small, should be at least "
"%" PRIuMAX " bytes\n", (uintmax_t) BLOCK_SIZE_BYTES,
(uintmax_t) (sizeof(SAMPLE_TYPE) / sizeof(uint8_t)));
(uintmax_t) ((sizeof(SAMPLE_TYPE) + sizeof(uint8_t) - 1) /
sizeof(uint8_t)));
return EXIT_FAILURE;
}