mirror of
https://github.com/curl/curl.git
synced 2026-08-26 05:23:33 +03:00
tidy-up: use CURL_ARRAYSIZE()
Follow-up to 13b2ea68f0 #16111
Closes #16381
This commit is contained in:
parent
1b710381ca
commit
3fd1dfc829
35 changed files with 52 additions and 64 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue