mirror of
https://github.com/curl/curl.git
synced 2026-08-26 13:03:32 +03:00
clang-tidy: enable readability-math-missing-parentheses, adjust code
No functional changes. Also: - md4, md5: drop redundant parentheses from macro values. Closes #20691
This commit is contained in:
parent
29bca12978
commit
65262be0ab
40 changed files with 85 additions and 80 deletions
|
|
@ -4232,7 +4232,7 @@ static CURLcode http_rw_hd(struct Curl_easy *data,
|
|||
k->httpversion = (unsigned char)(10 + (p[1] - '0'));
|
||||
p += 3;
|
||||
if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
|
||||
k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 +
|
||||
k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
|
||||
(p[2] - '0');
|
||||
/* RFC 9112 requires a single space following the status code,
|
||||
but the browsers do not so let's not insist */
|
||||
|
|
@ -4252,7 +4252,7 @@ static CURLcode http_rw_hd(struct Curl_easy *data,
|
|||
k->httpversion = (unsigned char)((*p - '0') * 10);
|
||||
p += 2;
|
||||
if(ISDIGIT(p[0]) && ISDIGIT(p[1]) && ISDIGIT(p[2])) {
|
||||
k->httpcode = (p[0] - '0') * 100 + (p[1] - '0') * 10 +
|
||||
k->httpcode = ((p[0] - '0') * 100) + ((p[1] - '0') * 10) +
|
||||
(p[2] - '0');
|
||||
p += 3;
|
||||
if(!ISBLANK(*p))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue