Ensure variables initialised
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
c07df36f9e
commit
9145dc46ed
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
||||||
*/
|
*/
|
||||||
int parse_hex_string(char *hex_string, uint64_t *result)
|
int parse_hex_string(char *hex_string, uint64_t *result)
|
||||||
{
|
{
|
||||||
uint8_t raw[8];
|
uint8_t raw[8] = {0};
|
||||||
size_t olen;
|
size_t olen;
|
||||||
if (mbedtls_test_unhexify(raw, sizeof(raw), hex_string, &olen) != 0) {
|
if (mbedtls_test_unhexify(raw, sizeof(raw), hex_string, &olen) != 0) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -104,7 +104,7 @@ void mbedtls_unaligned_access(int size, int offset)
|
||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE */
|
||||||
void mbedtls_byteswap(char *input_str, int size, char *expected_str)
|
void mbedtls_byteswap(char *input_str, int size, char *expected_str)
|
||||||
{
|
{
|
||||||
uint64_t input, expected;
|
uint64_t input = 0, expected = 0;
|
||||||
TEST_ASSERT(parse_hex_string(input_str, &input));
|
TEST_ASSERT(parse_hex_string(input_str, &input));
|
||||||
TEST_ASSERT(parse_hex_string(expected_str, &expected));
|
TEST_ASSERT(parse_hex_string(expected_str, &expected));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue