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/include/mbedtls/ssl.h b/include/mbedtls/ssl.h
index 221cee3..c0f2529 100644
--- a/include/mbedtls/ssl.h
+++ b/include/mbedtls/ssl.h
@@ -3146,16 +3146,16 @@
switch( profile )
{
case MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80:
- return( "MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80" );
+ return "MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_80" ;
case MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32:
- return( "MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32" );
+ return "MBEDTLS_TLS_SRTP_AES128_CM_HMAC_SHA1_32" ;
case MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80:
- return( "MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80" );
+ return "MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_80" ;
case MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32:
- return( "MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32" );
+ return "MBEDTLS_TLS_SRTP_NULL_HMAC_SHA1_32" ;
default: break;
}
- return( "" );
+ return "" ;
}
#endif /* MBEDTLS_DEBUG_C */
/**