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_dhm.function b/tests/suites/test_suite_dhm.function
index bc43016..db88daa 100644
--- a/tests/suites/test_suite_dhm.function
+++ b/tests/suites/test_suite_dhm.function
@@ -15,7 +15,7 @@
exit:
mbedtls_mpi_free( &actual );
- return( ok );
+ return ok ;
}
/* Sanity checks on a Diffie-Hellman parameter: check the length-value
@@ -47,7 +47,7 @@
ok = 1;
exit:
mbedtls_mpi_free( &actual );
- return( ok );
+ return ok ;
}
/* Sanity checks on Diffie-Hellman parameters: syntax, range, and comparison
@@ -75,9 +75,9 @@
goto exit;
TEST_EQUAL( offset, ske_len );
- return( 1 );
+ return 1 ;
exit:
- return( 0 );
+ return 0 ;
}
/* END_HEADER */