mirror of
https://github.com/curl/curl.git
synced 2026-08-26 12:43:34 +03:00
tidy-up: make per-file ARRAYSIZE macros global as CURL_ARRAYSIZE
Closes #16111
This commit is contained in:
parent
9da9a0226d
commit
13b2ea68f0
13 changed files with 37 additions and 84 deletions
|
|
@ -125,10 +125,6 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifndef ARRAYSIZE
|
||||
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
||||
#endif
|
||||
|
||||
#ifdef USE_NGHTTP2
|
||||
static void data_priority_cleanup(struct Curl_easy *data);
|
||||
#else
|
||||
|
|
@ -566,7 +562,7 @@ void Curl_conn_free(struct Curl_easy *data, struct connectdata *conn)
|
|||
|
||||
DEBUGASSERT(conn);
|
||||
|
||||
for(i = 0; i < ARRAYSIZE(conn->cfilter); ++i) {
|
||||
for(i = 0; i < CURL_ARRAYSIZE(conn->cfilter); ++i) {
|
||||
Curl_conn_cf_discard_all(data, conn, (int)i);
|
||||
}
|
||||
|
||||
|
|
@ -3106,7 +3102,7 @@ static CURLcode parse_connect_to_slist(struct Curl_easy *data,
|
|||
DEBUGF(infof(data, "check Alt-Svc for host %s", host));
|
||||
if(srcalpnid == ALPN_none) {
|
||||
/* scan all alt-svc protocol ids in order or relevance */
|
||||
for(i = 0; !hit && (i < ARRAYSIZE(alpn_ids)); ++i) {
|
||||
for(i = 0; !hit && (i < CURL_ARRAYSIZE(alpn_ids)); ++i) {
|
||||
srcalpnid = alpn_ids[i];
|
||||
hit = Curl_altsvc_lookup(data->asi,
|
||||
srcalpnid, host, conn->remote_port, /* from */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue