Skip restyling of PSA error code definitions

Some preprocessor macro definitions must have a specific expansion so that
the same macro name can be defined in different products. The definition of
having the same expansion (per the C language specification) means the same
sequence of tokens, and also the same absence/presence of spacing between
tokens.

For PSA error code definitions, the specific expansion is mandated by the
PSA Status code specification and the PSA Crypto API specification. In
particular, there must not be a space between (psa_status_t) and the
numerical value (whereas K&R would put a space).

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-01-04 19:50:27 +01:00
parent 262851df1c
commit 45873ceba3

View file

@ -58,6 +58,13 @@
* value, check with the Arm PSA framework group to pick one that other
* domains aren't already using. */
/* Tell uncrustify not to touch the constant definitions, otherwise
* it might change the spacing to something that is not PSA-compliant
* (e.g. adding a space after casts).
*
* *INDENT-OFF*
*/
/** The action was completed successfully. */
#define PSA_SUCCESS ((psa_status_t)0)
@ -328,6 +335,8 @@
*/
#define PSA_ERROR_DATA_INVALID ((psa_status_t)-153)
/* *INDENT-ON* */
/**@}*/
/** \defgroup crypto_types Key and algorithm types