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

@ -577,7 +577,7 @@ void ourWriteOut(struct OperationConfig *config, struct per_transfer *per,
if(!curlx_dyn_addn(&name, ptr, vlen)) {
find.name = curlx_dyn_ptr(&name);
wv = bsearch(&find,
variables, sizeof(variables)/sizeof(variables[0]),
variables, CURL_ARRAYSIZE(variables),
sizeof(variables[0]), matchvar);
}
if(wv) {
@ -601,7 +601,7 @@ void ourWriteOut(struct OperationConfig *config, struct per_transfer *per,
break;
case VAR_JSON:
ourWriteOutJSON(stream, variables,
sizeof(variables)/sizeof(variables[0]),
CURL_ARRAYSIZE(variables),
per, per_result);
break;
case VAR_HEADER_JSON: