Skip to content

Commit 0953ba1

Browse files
author
Hanno Becker
committed
Fix style in NUM_CIPHERS definition in cipher_wrap.c
Use brackets around `sizeof()` arguments as well as the entire macro.
1 parent 2e009fe commit 0953ba1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/cipher_wrap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2266,7 +2266,8 @@ const mbedtls_cipher_definition_t mbedtls_cipher_definitions[] =
22662266
{ MBEDTLS_CIPHER_NONE, NULL }
22672267
};
22682268

2269-
#define NUM_CIPHERS sizeof mbedtls_cipher_definitions / sizeof mbedtls_cipher_definitions[0]
2269+
#define NUM_CIPHERS ( sizeof(mbedtls_cipher_definitions) / \
2270+
sizeof(mbedtls_cipher_definitions[0]) )
22702271
int mbedtls_cipher_supported[NUM_CIPHERS];
22712272

22722273
#endif /* MBEDTLS_CIPHER_C */

0 commit comments

Comments
 (0)