From ce318382eefc52e1240a022f8ad5869222ca89ed Mon Sep 17 00:00:00 2001 From: Shawn Nock Date: Wed, 2 Aug 2017 16:24:03 -0400 Subject: [PATCH] Fixes compiler warning --- cmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmac.c b/cmac.c index 6b920d5..e543e06 100644 --- a/cmac.c +++ b/cmac.c @@ -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;