Gilles Peskine ed6feae513 Use MBEDTLS_ERROR_ADD instead of explicit addition: simple cases
Replace obvious additions of an `MBEDTLS_ERR_xxx` constant by a call to
`MBEDTLS_ERROR_ADD`.

Skip `case` statements since `MBEDTLS_ERROR_ADD(pp_constant)` is not a
preprocessor constant.

This commit does not replace additions split over lines. Those will be
handled in a subsequent commit.

```
git ls-files '*.h' '*.c' '*.function' '*.data' |
xargs perl -i -pe '
    next if /\bcase\b/;
    s/\b(MBEDTLS_ERR_\w+)\s*\+\s*(\w+)\b/MBEDTLS_ERROR_ADD($1, $2)/g;
    s/\b(\w+)\s*\+\s*(MBEDTLS_ERR_\w+)\b/MBEDTLS_ERROR_ADD($1, $2)/g'
```

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2024-10-16 11:52:24 +02:00
..
.jenkins
configs Fix a typo in a comment 2024-04-12 12:40:01 +02:00
docker/bionic Header updates 2023-11-03 12:21:36 +00:00
git-scripts Header updates 2023-11-03 12:21:36 +00:00
include Misc improvements to comments 2024-09-05 10:47:45 +02:00
opt-testcases Remove "error" allowance in dtls_server 2024-10-02 11:09:20 +02:00
psa-client-server Fix failing psasim tests 2024-10-07 14:50:00 +01:00
scripts Merge pull request #9668 from gilles-peskine-arm/analyze_outcome-split-dev 2024-10-10 13:45:49 +00:00
src Move PSA drivers to drivers/builtin/src 2024-10-01 15:32:01 +02:00
suites Use MBEDTLS_ERROR_ADD instead of explicit addition: simple cases 2024-10-16 11:52:24 +02:00
.gitignore Automatically generate tests/opt-testcases/tls13-compat.sh 2024-09-24 18:59:31 +02:00
CMakeLists.txt cmake: Add MBEDTLS_FRAMEWORK_DIR 2024-10-01 15:32:01 +02:00
compat-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
compat.sh Replace data_files path with variable in compat.sh 2024-07-05 15:49:28 +01:00
context-info.sh Update directory-climbing path in context-info.sh 2024-07-05 15:49:05 +01:00
Descriptions.txt
make-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
Makefile Merge pull request #9558 from gilles-peskine-arm/run-test-suites-on-subproject 2024-09-28 08:31:30 +00:00
ssl-opt-in-docker.sh Header updates 2023-11-03 12:21:36 +00:00
ssl-opt.sh Skip ssl_server in config-suite-b 2024-09-25 18:05:18 +02:00