1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-25 22:56:35 +08:00

Rewording comments

Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
This commit is contained in:
TRodziewicz 2021-07-14 10:16:26 +02:00
parent 829fe7038d
commit c9890e9a8c
2 changed files with 10 additions and 8 deletions

View File

@ -1002,10 +1002,11 @@ psa_status_t psa_wipe_key_slot( psa_key_slot_t *slot )
/* /*
* As the return error code may not be handled in case of multiple errors, * As the return error code may not be handled in case of multiple errors,
* do our best to report an unexpected lock counter: if available call * do our best to report an unexpected lock counter. Assert with
* MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called as * MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is equal to one:
* part of the execution of a test suite this will stop the test suite * if the MBEDTLS_TEST_HOOKS configuration option is enabled and the
* execution). * function is called as part of the execution of a test suite, the
* execution of the test suite is stopped in error if the assertion fails.
*/ */
if( slot->lock_count != 1 ) if( slot->lock_count != 1 )
{ {

View File

@ -414,10 +414,11 @@ psa_status_t psa_unlock_key_slot( psa_key_slot_t *slot )
/* /*
* As the return error code may not be handled in case of multiple errors, * As the return error code may not be handled in case of multiple errors,
* do our best to report if the lock counter is equal to zero: if available * do our best to report if the lock counter is equal to zero. Assert with
* call MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called * MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is strictly greater
* as part of the execution of a unit test suite this will stop the test * than zero: if the MBEDTLS_TEST_HOOKS configuration option is enabled and
* suite execution). * the function is called as part of the execution of a test suite, the
* execution of the test suite is stopped in error if the assertion fails.
*/ */
MBEDTLS_TEST_HOOK_TEST_ASSERT( slot->lock_count > 0 ); MBEDTLS_TEST_HOOK_TEST_ASSERT( slot->lock_count > 0 );
return( PSA_ERROR_CORRUPTION_DETECTED ); return( PSA_ERROR_CORRUPTION_DETECTED );