mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
clang-tidy: enable and fix readability-uppercase-literal-suffix
Ref: https://clang.llvm.org/extra/clang-tidy/checks/readability/uppercase-literal-suffix.html Closes #20629
This commit is contained in:
parent
3cdc167425
commit
c07c3cac74
@ -17,4 +17,5 @@ Checks: >-
|
||||
portability-*,
|
||||
readability-named-parameter,
|
||||
readability-redundant-control-flow,
|
||||
readability-redundant-preprocessor
|
||||
readability-redundant-preprocessor,
|
||||
readability-uppercase-literal-suffix
|
||||
|
||||
@ -539,7 +539,7 @@ CURLcode Curl_http_auth_act(struct Curl_easy *data)
|
||||
bool pickhost = FALSE;
|
||||
bool pickproxy = FALSE;
|
||||
CURLcode result = CURLE_OK;
|
||||
unsigned long authmask = ~0ul;
|
||||
unsigned long authmask = ~0UL;
|
||||
|
||||
if(!data->set.str[STRING_BEARER])
|
||||
authmask &= (unsigned long)~CURLAUTH_BEARER;
|
||||
|
||||
@ -267,8 +267,8 @@ static CURLproxycode socks4_req_add_hd(struct socks_state *sx,
|
||||
(void)data;
|
||||
buf[0] = 4; /* version (SOCKS4) */
|
||||
buf[1] = 1; /* connect */
|
||||
buf[2] = (unsigned char)((sx->remote_port >> 8) & 0xffu); /* MSB */
|
||||
buf[3] = (unsigned char)(sx->remote_port & 0xffu); /* LSB */
|
||||
buf[2] = (unsigned char)((sx->remote_port >> 8) & 0xffU); /* MSB */
|
||||
buf[3] = (unsigned char)(sx->remote_port & 0xffU); /* LSB */
|
||||
|
||||
result = Curl_bufq_write(&sx->iobuf, buf, 4, &nwritten);
|
||||
if(result || (nwritten != 4))
|
||||
@ -929,8 +929,8 @@ static CURLproxycode socks5_resolving(struct socks_state *sx,
|
||||
goto out;
|
||||
}
|
||||
/* PORT MSB+LSB */
|
||||
req[0] = (unsigned char)((sx->remote_port >> 8) & 0xffu);
|
||||
req[1] = (unsigned char)(sx->remote_port & 0xffu);
|
||||
req[0] = (unsigned char)((sx->remote_port >> 8) & 0xffU);
|
||||
req[1] = (unsigned char)(sx->remote_port & 0xffU);
|
||||
result = Curl_bufq_write(&sx->iobuf, req, 2, &nwritten);
|
||||
if(result || (nwritten != 2)) {
|
||||
presult = CURLPX_SEND_REQUEST;
|
||||
|
||||
@ -2732,7 +2732,7 @@ out:
|
||||
default:
|
||||
if(cerr->error_code >= NGTCP2_CRYPTO_ERROR) {
|
||||
CURL_TRC_CF(data, cf, "crypto error, tls alert=%u",
|
||||
(unsigned int)(cerr->error_code & 0xffu));
|
||||
(unsigned int)(cerr->error_code & 0xffU));
|
||||
}
|
||||
else if(cerr->error_code == NGTCP2_CONNECTION_REFUSED) {
|
||||
CURL_TRC_CF(data, cf, "connection refused by server");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user