tidy-up: make per-file ARRAYSIZE macros global as CURL_ARRAYSIZE

Closes #16111
This commit is contained in:
Viktor Szakats 2025-01-28 12:09:55 +01:00
parent 9da9a0226d
commit 13b2ea68f0
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
13 changed files with 37 additions and 84 deletions

View file

@ -38,10 +38,6 @@ static void unit_stop(void)
#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
defined(USE_MBEDTLS)
#ifndef ARRAYSIZE
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
#endif
struct test_spec {
const char *input;
const char *exp_output;
@ -111,7 +107,7 @@ UNITTEST_START
return TEST_ERR_MAJOR_BAD;
}
for(i = 0; i < ARRAYSIZE(test_specs); ++i) {
for(i = 0; i < CURL_ARRAYSIZE(test_specs); ++i) {
if(!do_test(&test_specs[i], i, &dbuf))
all_ok = FALSE;
}