1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Fix use of sizeof without brackets

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman
2023-02-02 12:40:50 +00:00
parent 24c6f49530
commit 6dd757a8ba
11 changed files with 51 additions and 51 deletions

View File

@@ -10,8 +10,8 @@ void md5_text(char *text_src_string, data_t *hash)
unsigned char src_str[100];
unsigned char output[16];
memset(src_str, 0x00, sizeof src_str);
memset(output, 0x00, sizeof output);
memset(src_str, 0x00, sizeof(src_str));
memset(output, 0x00, sizeof(output));
strncpy((char *) src_str, text_src_string, sizeof(src_str) - 1);
@@ -19,7 +19,7 @@ void md5_text(char *text_src_string, data_t *hash)
TEST_ASSERT(ret == 0);
TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
sizeof output, hash->len) == 0);
sizeof(output), hash->len) == 0);
}
/* END_CASE */
@@ -30,8 +30,8 @@ void ripemd160_text(char *text_src_string, data_t *hash)
unsigned char src_str[100];
unsigned char output[20];
memset(src_str, 0x00, sizeof src_str);
memset(output, 0x00, sizeof output);
memset(src_str, 0x00, sizeof(src_str));
memset(output, 0x00, sizeof(output));
strncpy((char *) src_str, text_src_string, sizeof(src_str) - 1);
@@ -39,7 +39,7 @@ void ripemd160_text(char *text_src_string, data_t *hash)
TEST_ASSERT(ret == 0);
TEST_ASSERT(mbedtls_test_hexcmp(output, hash->x,
sizeof output, hash->len) == 0);
sizeof(output), hash->len) == 0);
}
/* END_CASE */