1
0
Fork 0

Fixes compiler warning

This commit is contained in:
Shawn Nock 2017-08-02 16:24:03 -04:00
parent 3a5f4eb319
commit ce318382ee
1 changed files with 1 additions and 1 deletions

2
cmac.c
View File

@ -59,7 +59,7 @@ static void cmac_truncate(uint8_t *dest, uint8_t *tag, uint_fast8_t tag_len) {
void cmac_aes128(uint8_t *dest, uint8_t *msg, size_t msg_len,
uint_fast8_t tag_len) {
/* Simulate ceiling integer division by adding a block if remainder */
size_t num_blocks = msg_len >> 4 + (msg_len & 15 ? 1 : 0);
size_t num_blocks = (msg_len >> 4) + (msg_len & 15 ? 1 : 0);
bool last_block_complete = !(msg_len & 15 ? 1 : 0);
if (msg_len == 0) {
num_blocks = 1;