Fix parantheses on return and sizeof statements.
Used script:
```
import re
import sys
for arg in sys.argv[1:]:
print(arg)
with open(arg, 'r') as file:
content = file.read()
content = re.sub(r"return\s?\((?!.*\).*\()\s*\n?(.*)\n?\);", r"return \1;", \
content, flags = re.M)
content = re.sub(r"sizeof ([^\(][a-zA-Z0-9_\[\]]*)", r"sizeof(\1)",\
content, flags = re.M)
with open(arg, 'w') as file:
file.write(content)
```
Executed with:
` find . -regextype posix-egrep -regex ".*\.([hc]|fmt|function)" | xargs -L1 python script.py`
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
diff --git a/tests/suites/test_suite_x509write.function b/tests/suites/test_suite_x509write.function
index 261794c..a545093 100644
--- a/tests/suites/test_suite_x509write.function
+++ b/tests/suites/test_suite_x509write.function
@@ -24,7 +24,7 @@
}
size_t mbedtls_rsa_key_len_func( void *ctx )
{
- return( ((const mbedtls_rsa_context *) ctx)->len );
+ return ((const mbedtls_rsa_context *) ctx)->len ;
}
#endif /* MBEDTLS_RSA_C */
@@ -64,7 +64,7 @@
cleanup:
mbedtls_x509_csr_free( &csr );
- return( ret );
+ return ret ;
}
#endif /* MBEDTLS_USE_PSA_CRYPTO && MBEDTLS_PEM_WRITE_C && MBEDTLS_X509_CSR_WRITE_C */