tidy-up: use CURL_ARRAYSIZE()

Follow-up to 13b2ea68f0 #16111

Closes #16381
This commit is contained in:
Viktor Szakats 2025-02-18 14:48:18 +01:00
parent 1b710381ca
commit 3fd1dfc829
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
35 changed files with 52 additions and 64 deletions

View file

@ -101,7 +101,6 @@ static const struct testcase tests[] = {
UNITTEST_START
{
int i;
int testnum = sizeof(tests) / sizeof(struct testcase);
struct Curl_multi *multi = NULL;
struct Curl_easy *easy = NULL;
struct curl_slist *list = NULL;
@ -110,9 +109,9 @@ UNITTEST_START
and also clean cache after the loop. In contrast,for example,
test 1607 sets up and cleans cache on each iteration. */
for(i = 0; i < testnum; ++i) {
for(i = 0; i < (int)CURL_ARRAYSIZE(tests); ++i) {
int j;
int addressnum = sizeof (tests[i].address) / sizeof (*tests[i].address);
int addressnum = CURL_ARRAYSIZE(tests[i].address);
struct Curl_addrinfo *addr;
struct Curl_dns_entry *dns;
void *entry_id;