Skip to content

Commit a9e6d9f

Browse files
committed
Fix magic number in bucket declaration
Replace hard-coded value with BUCKET_SIZE macro for better readability. Change-Id: I4b123b7267dcb9beac8d791fd1e7cb9b75a6b446
1 parent 4bb347c commit a9e6d9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shannon_entropy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ double shannon_entropy(const uint8_t *s)
1515
uint64_t entropy_sum = 0;
1616
const uint64_t entropy_max = 8 * LOG2_RET_SHIFT;
1717

18-
uint32_t bucket[256];
18+
uint32_t bucket[BUCKET_SIZE];
1919
memset(&bucket, 0, sizeof(bucket));
2020

2121
for (uint32_t i = 0; i < count; i++)

0 commit comments

Comments
 (0)