mirror of
https://github.com/curl/curl.git
synced 2026-08-24 16:23: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
|
|
@ -63,10 +63,6 @@
|
|||
/* The last #include file should be: */
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifndef ARRAYSIZE
|
||||
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
||||
#endif
|
||||
|
||||
#define QUIC_PRIORITY \
|
||||
"NORMAL:-VERS-ALL:+VERS-TLS1.3:-CIPHER-ALL:+AES-128-GCM:+AES-256-GCM:" \
|
||||
"+CHACHA20-POLY1305:+AES-128-CCM:-GROUP-ALL:+GROUP-SECP256R1:" \
|
||||
|
|
@ -1223,7 +1219,7 @@ CURLcode Curl_gtls_ctx_init(struct gtls_ctx *gctx,
|
|||
size_t i, alen = alpn_len;
|
||||
unsigned char *salpn = (unsigned char *)alpn;
|
||||
unsigned char slen;
|
||||
for(i = 0; (i < ARRAYSIZE(gtls_alpns)) && alen; ++i) {
|
||||
for(i = 0; (i < CURL_ARRAYSIZE(gtls_alpns)) && alen; ++i) {
|
||||
slen = salpn[0];
|
||||
if(slen >= alen)
|
||||
return CURLE_FAILED_INIT;
|
||||
|
|
|
|||
|
|
@ -116,10 +116,6 @@
|
|||
#include "curl_memory.h"
|
||||
#include "memdebug.h"
|
||||
|
||||
#ifndef ARRAYSIZE
|
||||
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
|
||||
#endif
|
||||
|
||||
/* Uncomment the ALLOW_RENEG line to a real #define if you want to allow TLS
|
||||
renegotiations when built with BoringSSL. Renegotiating is non-compliant
|
||||
with HTTP/2 and "an extremely dangerous protocol feature". Beware.
|
||||
|
|
@ -3359,7 +3355,7 @@ static CURLcode ossl_populate_x509_store(struct Curl_cfilter *cf,
|
|||
"CA" /* Intermediate Certification Authorities */
|
||||
};
|
||||
size_t i;
|
||||
for(i = 0; i < ARRAYSIZE(storeNames); ++i) {
|
||||
for(i = 0; i < CURL_ARRAYSIZE(storeNames); ++i) {
|
||||
bool imported = FALSE;
|
||||
result = import_windows_cert_store(data, storeNames[i], store,
|
||||
&imported);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue