mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-15 23:42:41 +00:00
Remove unnecessary checks for NULL-ness of copies
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
58909704e3
commit
365df3f16c
@ -94,9 +94,7 @@ void input_copy_alloc(int input_len, psa_status_t exp_status)
|
|||||||
TEST_EQUAL(status, exp_status);
|
TEST_EQUAL(status, exp_status);
|
||||||
|
|
||||||
if (exp_status == PSA_SUCCESS) {
|
if (exp_status == PSA_SUCCESS) {
|
||||||
if (input_len == 0) {
|
if (input_len != 0) {
|
||||||
TEST_ASSERT(input_copy.buffer == NULL);
|
|
||||||
} else {
|
|
||||||
TEST_ASSERT(input_copy.buffer != input);
|
TEST_ASSERT(input_copy.buffer != input);
|
||||||
}
|
}
|
||||||
TEST_MEMORY_COMPARE(input, input_len,
|
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) {
|
if (exp_status == PSA_SUCCESS) {
|
||||||
TEST_ASSERT(output_copy.original == output);
|
TEST_ASSERT(output_copy.original == output);
|
||||||
if (output_len == 0) {
|
|
||||||
TEST_ASSERT(output_copy.buffer == NULL);
|
|
||||||
}
|
|
||||||
TEST_EQUAL(output_copy.len, output_len);
|
TEST_EQUAL(output_copy.len, output_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user