Remove unneccesary nesting
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function
index f5865bb..7c3e990 100644
--- a/tests/suites/test_suite_psa_crypto.function
+++ b/tests/suites/test_suite_psa_crypto.function
@@ -439,16 +439,13 @@
{
part_length = 0;
}
+ else if( additional_data->len - part_offset < ad_part_len )
+ {
+ part_length = additional_data->len - part_offset;
+ }
else
{
- if( additional_data->len - part_offset < ad_part_len )
- {
- part_length = additional_data->len - part_offset;
- }
- else
- {
- part_length = ad_part_len;
- }
+ part_length = ad_part_len;
}
PSA_ASSERT( psa_aead_update_ad( &operation,
@@ -481,16 +478,13 @@
{
part_length = 0;
}
+ else if( ( data_true_size - part_offset ) < data_part_len )
+ {
+ part_length = ( data_true_size - part_offset );
+ }
else
{
- if( ( data_true_size - part_offset ) < data_part_len )
- {
- part_length = ( data_true_size - part_offset );
- }
- else
- {
- part_length = data_part_len;
- }
+ part_length = data_part_len;
}
PSA_ASSERT( psa_aead_update( &operation,