Skip to content

Commit bef6eef

Browse files
Move the description of MBEDTLS_TEST_DEFINES_ZEROIZE to before its use
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
1 parent 35a8fa7 commit bef6eef

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

include/mbedtls/platform_util.h

+5-9
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t;
145145
#define MBEDTLS_IGNORE_RETURN(result) ((void) !(result))
146146
#endif
147147

148+
/* If the following macro is defined, the library is being built by the test
149+
* framework, and the framework is going to provide a replacement
150+
* mbedtls_platform_zeroize() using a preprocessor macro, so the function
151+
* declaration should be omitted. */
152+
#if !defined(MBEDTLS_TEST_DEFINES_ZEROIZE) //no-check-names
148153
/**
149154
* \brief Securely zeroize a buffer
150155
*
@@ -167,18 +172,9 @@ MBEDTLS_DEPRECATED typedef int mbedtls_deprecated_numeric_constant_t;
167172
* \param len Length of the buffer in bytes
168173
*
169174
*/
170-
#if !defined(MBEDTLS_TEST_DEFINES_ZEROIZE)
171175
void mbedtls_platform_zeroize(void *buf, size_t len);
172176
#endif
173177

174-
/* MBEDTLS_TEST_DEFINES_ZEROIZE
175-
*
176-
* Indicates that the library is being built by the test framework, and the
177-
* framework is going to provide a replacement mbedtls_platform_zeroize()
178-
* using a pre-processor macro, so the function declaration should be omitted.
179-
*/
180-
//#define MBEDTLS_TEST_DEFINES_ZEROIZE
181-
182178
#if defined(MBEDTLS_HAVE_TIME_DATE)
183179
/**
184180
* \brief Platform-specific implementation of gmtime_r()

0 commit comments

Comments
 (0)