Use ARRAYLEN instead of constant length

This commit is contained in:
DarkMatterMatt 2021-02-11 11:30:22 +13:00
commit 0fdbdb044f

View file

@ -204,7 +204,7 @@ static void createBlocks(uint32_t *blocks, uint8_t rc, uint16_t fc, uint32_t cn,
// every byte has a 9th bit which is the inverse of the last bit // every byte has a 9th bit which is the inverse of the last bit
uint8_t bonus_bit[8] = {0}; uint8_t bonus_bit[8] = {0};
for (int i = 0; i < 8; i++) { for (int i = 0; i < ARRAYLEN(bonus_bit); i++) {
bonus_bit[i] = !(arr[i] & 0x1); bonus_bit[i] = !(arr[i] & 0x1);
} }