From a7d2afe1192e5c21b7fa19e42f044d1041dbfbac Mon Sep 17 00:00:00 2001
From: David Horstmann <david.horstmann@arm.com>
Date: Wed, 23 Oct 2024 16:55:20 +0100
Subject: [PATCH] Tidy up header guards

Signed-off-by: David Horstmann <david.horstmann@arm.com>
---
 tests/include/test/psa_crypto_helpers.h | 15 +++++----------
 tests/src/psa_exercise_key.c            |  6 ++----
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/tests/include/test/psa_crypto_helpers.h b/tests/include/test/psa_crypto_helpers.h
index dc2f4ebdbf..9d5da02488 100644
--- a/tests/include/test/psa_crypto_helpers.h
+++ b/tests/include/test/psa_crypto_helpers.h
@@ -11,10 +11,8 @@
 
 #include "test/helpers.h"
 
-#if ((MBEDTLS_VERSION_MAJOR < 4) \
-    && defined(MBEDTLS_PSA_CRYPTO_C)) \
-    || (MBEDTLS_VERSION_MAJOR >= 4 \
-        && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
+#if (MBEDTLS_VERSION_MAJOR < 4 && defined(MBEDTLS_PSA_CRYPTO_C)) || \
+    (MBEDTLS_VERSION_MAJOR >= 4 && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
 #include "test/psa_helpers.h"
 #include <psa/crypto.h>
 #endif
@@ -43,8 +41,7 @@
         mbedtls_psa_crypto_free();                                      \
     }                                                                   \
     while (0)
-#elif MBEDTLS_VERSION_MAJOR >= 4 && \
-    defined(MBEDTLS_PSA_CRYPTO_CLIENT)   /* MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C */
+#elif MBEDTLS_VERSION_MAJOR >= 4 && defined(MBEDTLS_PSA_CRYPTO_CLIENT)
 #define PSA_INIT() PSA_ASSERT(psa_crypto_init())
 #define PSA_DONE() mbedtls_psa_crypto_free();
 #else  /* MBEDTLS_PSA_CRYPTO_CLIENT && !MBEDTLS_PSA_CRYPTO_C */
@@ -52,10 +49,8 @@
 #define PSA_DONE() ((void) 0)
 #endif /* MBEDTLS_PSA_CRYPTO_C */
 
-#if ((MBEDTLS_VERSION_MAJOR < 4) \
-    && defined(MBEDTLS_PSA_CRYPTO_C)) \
-    || (MBEDTLS_VERSION_MAJOR >= 4 \
-        && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
+#if (MBEDTLS_VERSION_MAJOR < 4 && defined(MBEDTLS_PSA_CRYPTO_C)) || \
+    (MBEDTLS_VERSION_MAJOR >= 4 && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
 
 #if defined(MBEDTLS_PSA_CRYPTO_STORAGE_C)
 
diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c
index 5c821e2f85..032c489201 100644
--- a/tests/src/psa_exercise_key.c
+++ b/tests/src/psa_exercise_key.c
@@ -11,10 +11,8 @@
 #include <test/macros.h>
 #include <test/psa_exercise_key.h>
 
-#if ((MBEDTLS_VERSION_MAJOR < 4) \
-    && defined(MBEDTLS_PSA_CRYPTO_C)) \
-    || (MBEDTLS_VERSION_MAJOR >= 4 \
-        && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
+#if (MBEDTLS_VERSION_MAJOR < 4 && defined(MBEDTLS_PSA_CRYPTO_C)) || \
+    (MBEDTLS_VERSION_MAJOR >= 4 && defined(MBEDTLS_PSA_CRYPTO_CLIENT))
 
 #include <mbedtls/asn1.h>
 #include <psa/crypto.h>