From 37e3fc6c76d0baa873e490413926ee0989d5978a Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Thu, 16 Nov 2023 20:30:36 +0000 Subject: [PATCH] Remove unnecessary checks for NULL-ness of copies Signed-off-by: David Horstmann --- tests/suites/test_suite_psa_crypto_memory.function | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/suites/test_suite_psa_crypto_memory.function b/tests/suites/test_suite_psa_crypto_memory.function index 83fa6cbd8..7b6b7f189 100644 --- a/tests/suites/test_suite_psa_crypto_memory.function +++ b/tests/suites/test_suite_psa_crypto_memory.function @@ -94,9 +94,7 @@ void input_copy_alloc(int input_len, psa_status_t exp_status) TEST_EQUAL(status, exp_status); if (exp_status == PSA_SUCCESS) { - if (input_len == 0) { - TEST_ASSERT(input_copy.buffer == NULL); - } else { + if (input_len != 0) { TEST_ASSERT(input_copy.buffer != input); } TEST_MEMORY_COMPARE(input, input_len, @@ -167,9 +165,6 @@ void output_copy_alloc(int output_len, psa_status_t exp_status) if (exp_status == PSA_SUCCESS) { TEST_ASSERT(output_copy.original == output); - if (output_len == 0) { - TEST_ASSERT(output_copy.buffer == NULL); - } TEST_EQUAL(output_copy.len, output_len); }