Switch to the new code style
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/suites/test_suite_constant_time.function b/tests/suites/test_suite_constant_time.function
index a3673b7..a40149a 100644
--- a/tests/suites/test_suite_constant_time.function
+++ b/tests/suites/test_suite_constant_time.function
@@ -16,34 +16,33 @@
/* END_HEADER */
/* BEGIN_CASE depends_on:MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC:MBEDTLS_TEST_HOOKS */
-void ssl_cf_memcpy_offset( int offset_min, int offset_max, int len )
+void ssl_cf_memcpy_offset(int offset_min, int offset_max, int len)
{
unsigned char *dst = NULL;
unsigned char *src = NULL;
size_t src_len = offset_max + len;
size_t secret;
- ASSERT_ALLOC( dst, len );
- ASSERT_ALLOC( src, src_len );
+ ASSERT_ALLOC(dst, len);
+ ASSERT_ALLOC(src, src_len);
/* Fill src in a way that we can detect if we copied the right bytes */
- mbedtls_test_rnd_std_rand( NULL, src, src_len );
+ mbedtls_test_rnd_std_rand(NULL, src, src_len);
- for( secret = offset_min; secret <= (size_t) offset_max; secret++ )
- {
- mbedtls_test_set_step( (int) secret );
+ for (secret = offset_min; secret <= (size_t) offset_max; secret++) {
+ mbedtls_test_set_step((int) secret);
- TEST_CF_SECRET( &secret, sizeof( secret ) );
- mbedtls_ct_memcpy_offset( dst, src, secret,
- offset_min, offset_max, len );
- TEST_CF_PUBLIC( &secret, sizeof( secret ) );
- TEST_CF_PUBLIC( dst, len );
+ TEST_CF_SECRET(&secret, sizeof(secret));
+ mbedtls_ct_memcpy_offset(dst, src, secret,
+ offset_min, offset_max, len);
+ TEST_CF_PUBLIC(&secret, sizeof(secret));
+ TEST_CF_PUBLIC(dst, len);
- ASSERT_COMPARE( dst, len, src + secret, len );
+ ASSERT_COMPARE(dst, len, src + secret, len);
}
exit:
- mbedtls_free( dst );
- mbedtls_free( src );
+ mbedtls_free(dst);
+ mbedtls_free(src);
}
/* END_CASE */