From 7a31ac02ab55deebf7325793383308c663da4f21 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Fri, 3 Nov 2023 19:28:08 +0000 Subject: [PATCH] Switch from int to psa_status_t for test args Remove unnecessary casts as well. Signed-off-by: David Horstmann --- tests/suites/test_suite_psa_crypto.function | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index a9c9d0543..b698f113a 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -5711,7 +5711,7 @@ exit: /* END_CASE */ /* BEGIN_CASE */ -void copy_input(int src_len, int dst_len, int exp_ret) +void copy_input(int src_len, int dst_len, psa_status_t exp_ret) { uint8_t *src_buffer = NULL; uint8_t *dst_buffer = NULL; @@ -5727,9 +5727,9 @@ void copy_input(int src_len, int dst_len, int exp_ret) fill_buffer_pattern(src_buffer, src_len); ret = psa_crypto_copy_input(src_buffer, src_len, dst_buffer, dst_len); - TEST_EQUAL((int) ret, exp_ret); + TEST_EQUAL(ret, exp_ret); - if (exp_ret == (int) PSA_SUCCESS) { + if (exp_ret == PSA_SUCCESS) { /* Note: We compare the first src_len bytes of each buffer, as this is what was copied. */ TEST_MEMORY_COMPARE(src_buffer, src_len, dst_buffer, src_len); } @@ -5741,7 +5741,7 @@ exit: /* END_CASE */ /* BEGIN_CASE */ -void copy_output(int src_len, int dst_len, int exp_ret) +void copy_output(int src_len, int dst_len, psa_status_t exp_ret) { uint8_t *src_buffer = NULL; uint8_t *dst_buffer = NULL; @@ -5757,9 +5757,9 @@ void copy_output(int src_len, int dst_len, int exp_ret) fill_buffer_pattern(src_buffer, src_len); ret = psa_crypto_copy_output(src_buffer, src_len, dst_buffer, dst_len); - TEST_EQUAL((int) ret, exp_ret); + TEST_EQUAL(ret, exp_ret); - if (exp_ret == (int) PSA_SUCCESS) { + if (exp_ret == PSA_SUCCESS) { /* Note: We compare the first src_len bytes of each buffer, as this is what was copied. */ TEST_MEMORY_COMPARE(src_buffer, src_len, dst_buffer, src_len); }