mirror of
https://github.com/curl/curl.git
synced 2026-08-26 00:43:52 +03:00
tidy-up: miscellaneous (cont.)
- examples: replace magic numbers with `sizeof()`. - typos: drop rules no longer needed after excluding tests/data. - typos: move an exception inline. - alpha-sort lists. - fix indentation, whitespace. Closes #18898
This commit is contained in:
parent
b12da22db1
commit
6f0e212f6e
17 changed files with 29 additions and 30 deletions
|
|
@ -222,8 +222,8 @@ CURLcode Curl_amiga_init(void)
|
|||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
if(SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno,
|
||||
SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG) "curl",
|
||||
if(SocketBaseTags(SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG)&errno,
|
||||
SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG)"curl",
|
||||
TAG_DONE)) {
|
||||
CURL_AMIGA_REQUEST("SocketBaseTags ERROR");
|
||||
return CURLE_FAILED_INIT;
|
||||
|
|
|
|||
|
|
@ -412,9 +412,9 @@ evaluate:
|
|||
if(!more_possible)
|
||||
more_possible = cf_ai_iter_has_more(&bs->ipv6_iter);
|
||||
#endif
|
||||
do_more = more_possible &&
|
||||
(curlx_timediff(now, bs->last_attempt_started) >=
|
||||
bs->attempt_delay_ms);
|
||||
do_more = more_possible &&
|
||||
(curlx_timediff(now, bs->last_attempt_started) >=
|
||||
bs->attempt_delay_ms);
|
||||
if(do_more)
|
||||
CURL_TRC_CF(data, cf, "happy eyeballs timeout expired, "
|
||||
"start next attempt");
|
||||
|
|
|
|||
|
|
@ -312,6 +312,7 @@ void Curl_trc_timer(struct Curl_easy *data, int tid, const char *fmt, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
void Curl_trc_easy_timers(struct Curl_easy *data)
|
||||
{
|
||||
if(CURL_TRC_TIMER_is_verbose(data)) {
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ static CURLcode rtsp_do(struct Curl_easy *data, bool *done)
|
|||
* Go ahead and use the Range stuff supplied for HTTP
|
||||
*/
|
||||
if(data->state.use_range &&
|
||||
(rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
|
||||
(rtspreq & (RTSPREQ_PLAY | RTSPREQ_PAUSE | RTSPREQ_RECORD))) {
|
||||
|
||||
/* Check to see if there is a range set in the custom headers */
|
||||
if(!Curl_checkheaders(data, STRCONST("Range")) && data->state.range) {
|
||||
|
|
|
|||
|
|
@ -364,7 +364,7 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
|
|||
}
|
||||
|
||||
/* Store the challenge for use later */
|
||||
digest->input_token = (BYTE *) Curl_memdup(chlg, chlglen + 1);
|
||||
digest->input_token = (BYTE *)Curl_memdup(chlg, chlglen + 1);
|
||||
if(!digest->input_token)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ CURLcode Curl_auth_create_ntlm_type1_message(struct Curl_easy *data,
|
|||
ntlm->context, &type_1_desc,
|
||||
&attrs, NULL);
|
||||
if(status == SEC_I_COMPLETE_NEEDED ||
|
||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||
status == SEC_I_COMPLETE_AND_CONTINUE)
|
||||
Curl_pSecFn->CompleteAuthToken(ntlm->context, &type_1_desc);
|
||||
else if(status == SEC_E_INSUFFICIENT_MEMORY)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
|
|
|||
|
|
@ -143,8 +143,8 @@ struct cf_ngtcp2_ctx {
|
|||
uint64_t max_bidi_streams; /* max bidi streams we can open */
|
||||
size_t earlydata_max; /* max amount of early data supported by
|
||||
server on session reuse */
|
||||
size_t earlydata_skip; /* sending bytes to skip when earlydata
|
||||
* is accepted by peer */
|
||||
size_t earlydata_skip; /* sending bytes to skip when earlydata
|
||||
is accepted by peer */
|
||||
CURLcode tls_vrfy_result; /* result of TLS peer verification */
|
||||
int qlogfd;
|
||||
BIT(initialized);
|
||||
|
|
|
|||
|
|
@ -3358,9 +3358,9 @@ static CURLcode ossl_windows_load_anchors(struct Curl_cfilter *cf,
|
|||
#endif /* USE_WIN32_CRYPTO */
|
||||
|
||||
static CURLcode ossl_load_trust_anchors(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
struct ossl_ctx *octx,
|
||||
X509_STORE *store)
|
||||
struct Curl_easy *data,
|
||||
struct ossl_ctx *octx,
|
||||
X509_STORE *store)
|
||||
{
|
||||
struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
|
||||
struct ssl_config_data *ssl_config = Curl_ssl_cf_get_config(cf, data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue