Add documentation comment to internal abort functions
Explain the reasoning behind not clearing some variables.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 419be16..97edc15 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -3192,6 +3192,10 @@
operation->id = 0;
+ /* Do not clear either the error_occurred or num_ops elements here as they
+ * only want to be cleared by the application calling abort, not by abort
+ * being called at completion of an operation. */
+
return status;
}
@@ -3335,6 +3339,10 @@
operation->id = 0;
+ /* Do not clear either the error_occurred or num_ops elements here as they
+ * only want to be cleared by the application calling abort, not by abort
+ * being called at completion of an operation. */
+
return status;
}