Fix style in NUM_CIPHERS definition in cipher_wrap.c

Use brackets around `sizeof()` arguments as well as the entire macro.
This commit is contained in:
Hanno Becker 2018-11-08 16:01:22 +00:00
parent e5a0450809
commit c3d25b31ab

View file

@ -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 */