From a9cbdfbb349a3bed44ad7241472e938e944278f5 Mon Sep 17 00:00:00 2001 From: Mateusz Starzyk Date: Tue, 27 Jul 2021 13:49:54 +0200 Subject: [PATCH] Replace ccm status flags with bitshifts. Signed-off-by: Mateusz Starzyk --- library/ccm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/ccm.c b/library/ccm.c index 399a936e93..be1671c04c 100644 --- a/library/ccm.c +++ b/library/ccm.c @@ -107,9 +107,9 @@ void mbedtls_ccm_free( mbedtls_ccm_context *ctx ) } #define CCM_STATE__CLEAR 0 -#define CCM_STATE__STARTED 0x0001 -#define CCM_STATE__LENGHTS_SET 0x0002 -#define CCM_STATE__ERROR 0x0004 +#define CCM_STATE__STARTED (1 << 0) +#define CCM_STATE__LENGHTS_SET (1 << 1) +#define CCM_STATE__ERROR (1 << 2) /* * Encrypt or decrypt a partial block with CTR