diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 2847d70de..c84bbd237 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -118,12 +118,12 @@ mbedtls_psa_drbg_context_t *const mbedtls_psa_random_state =
* - The name _copy is not used for the given value of
*/
#define SWAP_FOR_LOCAL_INPUT(input, length) \
- psa_crypto_local_input_t input ## _copy = PSA_CRYPTO_LOCAL_INPUT_INIT; \
- status = psa_crypto_local_input_alloc(input, length, &input ## _copy); \
+ psa_crypto_local_input_t input##_copy = PSA_CRYPTO_LOCAL_INPUT_INIT; \
+ status = psa_crypto_local_input_alloc(input, length, &input##_copy); \
if (status != PSA_SUCCESS) { \
goto exit; \
} \
- input = input ## _copy.buffer;
+ input = input##_copy.buffer;
/* Free the substituted input buffer copy created by SWAP_FOR_LOCAL_INPUT().
* Note that this does not restore the pointer to the original buffer.
@@ -135,7 +135,7 @@ mbedtls_psa_drbg_context_t *const mbedtls_psa_random_state =
*/
#define FREE_LOCAL_INPUT(input) \
input = NULL; \
- psa_crypto_local_input_free(&input ## _copy);
+ psa_crypto_local_input_free(&input##_copy);
/* Substitute an output buffer for a local copy of itself.
* Assumptions:
@@ -144,12 +144,12 @@ mbedtls_psa_drbg_context_t *const mbedtls_psa_random_state =
* - The name