mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-08-02 17:57:36 +08:00
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>
|
||
|---|---|---|
| .. | ||
| data_files | ||
| mbedtls_dev | ||
| abi_check.py | ||
| apidoc_full.sh | ||
| assemble_changelog.py | ||
| bump_version.sh | ||
| config.pl | ||
| config.py | ||
| ecc-heap.sh | ||
| ecp_comb_table.py | ||
| find-mem-leak.cocci | ||
| footprint.sh | ||
| generate_errors.pl | ||
| generate_features.pl | ||
| generate_psa_constants.py | ||
| generate_query_config.pl | ||
| generate_visualc_files.pl | ||
| make_generated_files.bat | ||
| massif_max.pl | ||
| memory.sh | ||
| output_env.sh | ||
| rm-calloc-cast.cocci | ||
| tmp_ignore_makefiles.sh | ||
| windows_msbuild.bat | ||