less hardcoded sizes and more ARRAYLEN

This commit is contained in:
Philippe Teuwen 2019-07-31 23:44:53 +02:00
commit f276dca3f1
16 changed files with 43 additions and 53 deletions

View file

@ -262,7 +262,7 @@ void RunMod() {
keys in keyBlock's memory space .
*/
keyBlock = BigBuf_malloc(stKeyBlock * 6);
int mfKeysCnt = sizeof(mfKeys) / sizeof(uint64_t);
int mfKeysCnt = ARRAYLEN(mfKeys);
for (int mfKeyCounter = 0; mfKeyCounter < mfKeysCnt; mfKeyCounter++) {
num_to_bytes(mfKeys[mfKeyCounter], 6, (uint8_t *)(keyBlock + mfKeyCounter * 6));