Switch to the new code style
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/programs/hash/hello.c b/programs/hash/hello.c
index 3ef0652..7bb27ad 100644
--- a/programs/hash/hello.c
+++ b/programs/hash/hello.c
@@ -26,30 +26,32 @@
#endif
#if !defined(MBEDTLS_MD5_C)
-int main( void )
+int main(void)
{
mbedtls_printf("MBEDTLS_MD5_C not defined.\n");
- mbedtls_exit( 0 );
+ mbedtls_exit(0);
}
#else
-int main( void )
+int main(void)
{
int i, ret;
unsigned char digest[16];
char str[] = "Hello, world!";
- mbedtls_printf( "\n MD5('%s') = ", str );
+ mbedtls_printf("\n MD5('%s') = ", str);
- if( ( ret = mbedtls_md5( (unsigned char *) str, 13, digest ) ) != 0 )
- mbedtls_exit( MBEDTLS_EXIT_FAILURE );
+ if ((ret = mbedtls_md5((unsigned char *) str, 13, digest)) != 0) {
+ mbedtls_exit(MBEDTLS_EXIT_FAILURE);
+ }
- for( i = 0; i < 16; i++ )
- mbedtls_printf( "%02x", digest[i] );
+ for (i = 0; i < 16; i++) {
+ mbedtls_printf("%02x", digest[i]);
+ }
- mbedtls_printf( "\n\n" );
+ mbedtls_printf("\n\n");
- mbedtls_exit( MBEDTLS_EXIT_SUCCESS );
+ mbedtls_exit(MBEDTLS_EXIT_SUCCESS);
}
#endif /* MBEDTLS_MD5_C */