Switch to the new code style
Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/include/mbedtls/error.h b/include/mbedtls/error.h
index 4a97d65..23a83f2 100644
--- a/include/mbedtls/error.h
+++ b/include/mbedtls/error.h
@@ -121,15 +121,15 @@
* Wrapper macro for mbedtls_error_add(). See that function for
* more details.
*/
-#define MBEDTLS_ERROR_ADD( high, low ) \
- mbedtls_error_add( high, low, __FILE__, __LINE__ )
+#define MBEDTLS_ERROR_ADD(high, low) \
+ mbedtls_error_add(high, low, __FILE__, __LINE__)
#if defined(MBEDTLS_TEST_HOOKS)
/**
* \brief Testing hook called before adding/combining two error codes together.
* Only used when invasive testing is enabled via MBEDTLS_TEST_HOOKS.
*/
-extern void (*mbedtls_test_hook_error_add)( int, int, const char *, int );
+extern void (*mbedtls_test_hook_error_add)(int, int, const char *, int);
#endif
/**
@@ -150,17 +150,18 @@
* \param file file where this error code addition occurred.
* \param line line where this error code addition occurred.
*/
-static inline int mbedtls_error_add( int high, int low,
- const char *file, int line )
+static inline int mbedtls_error_add(int high, int low,
+ const char *file, int line)
{
#if defined(MBEDTLS_TEST_HOOKS)
- if( *mbedtls_test_hook_error_add != NULL )
- ( *mbedtls_test_hook_error_add )( high, low, file, line );
+ if (*mbedtls_test_hook_error_add != NULL) {
+ (*mbedtls_test_hook_error_add)(high, low, file, line);
+ }
#endif
- (void)file;
- (void)line;
+ (void) file;
+ (void) line;
- return( high + low );
+ return high + low;
}
/**
@@ -172,7 +173,7 @@
* \param buffer buffer to place representation in
* \param buflen length of the buffer
*/
-void mbedtls_strerror( int errnum, char *buffer, size_t buflen );
+void mbedtls_strerror(int errnum, char *buffer, size_t buflen);
/**
* \brief Translate the high-level part of an Mbed TLS error code into a string
@@ -187,7 +188,7 @@
* \return The string representation of the error code, or \c NULL if the error
* code is unknown.
*/
-const char * mbedtls_high_level_strerr( int error_code );
+const char *mbedtls_high_level_strerr(int error_code);
/**
* \brief Translate the low-level part of an Mbed TLS error code into a string
@@ -202,7 +203,7 @@
* \return The string representation of the error code, or \c NULL if the error
* code is unknown.
*/
-const char * mbedtls_low_level_strerr( int error_code );
+const char *mbedtls_low_level_strerr(int error_code);
#ifdef __cplusplus
}