From 0953ba18993999a7e772b7fa2e71fdb902dfdcea Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 8 Nov 2018 16:01:22 +0000 Subject: [PATCH] Fix style in NUM_CIPHERS definition in cipher_wrap.c Use brackets around `sizeof()` arguments as well as the entire macro. --- library/cipher_wrap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/cipher_wrap.c b/library/cipher_wrap.c index 6dd8c5d3a..d4538ed7b 100644 --- a/library/cipher_wrap.c +++ b/library/cipher_wrap.c @@ -2266,7 +2266,8 @@ const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] = { MBEDTLS_CIPHER_NONE, NULL } }; -#define NUM_CIPHERS sizeof mbedtls_cipher_definitions / sizeof mbedtls_cipher_definitions[0] +#define NUM_CIPHERS ( sizeof(mbedtls_cipher_definitions) / \ + sizeof(mbedtls_cipher_definitions[0]) ) int mbedtls_cipher_supported[NUM_CIPHERS]; #endif /* MBEDTLS_CIPHER_C */