Rewording comments
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index a8f3674..3574b98 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1002,10 +1002,11 @@
/*
* 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
- * MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called as
- * part of the execution of a test suite this will stop the test suite
- * execution).
+ * do our best to report an unexpected lock counter. Assert with
+ * MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is equal to one:
+ * if the MBEDTLS_TEST_HOOKS configuration option is enabled and 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.
*/
if( slot->lock_count != 1 )
{
diff --git a/library/psa_crypto_slot_management.c b/library/psa_crypto_slot_management.c
index 49e6b87..a5c43b1 100644
--- a/library/psa_crypto_slot_management.c
+++ b/library/psa_crypto_slot_management.c
@@ -414,10 +414,11 @@
/*
* 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
- * call MBEDTLS_TEST_HOOK_TEST_ASSERT that may terminate execution (if called
- * as part of the execution of a unit test suite this will stop the test
- * suite execution).
+ * do our best to report if the lock counter is equal to zero. Assert with
+ * MBEDTLS_TEST_HOOK_TEST_ASSERT that the lock counter is strictly greater
+ * than zero: if the MBEDTLS_TEST_HOOKS configuration option is enabled and
+ * 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 );
return( PSA_ERROR_CORRUPTION_DETECTED );