mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
clang-tidy: check bugprone-macro-parentheses, fix fallouts
Also: - lib/parsedate: avoid relying on side-effect of missing parentheses. - lib/http: drop redundant parentheses. - fix cases in headers missed by clang-tidy. Ref: https://clang.llvm.org/extra/clang-tidy/checks/bugprone/macro-parentheses.html Closes #20647
This commit is contained in:
parent
9ce9afa312
commit
139307865a
36 changed files with 163 additions and 156 deletions
|
|
@ -78,10 +78,10 @@
|
|||
/* macro to check for a three-digit ftp status code at the start of the
|
||||
given string */
|
||||
#define STATUSCODE(line) \
|
||||
(ISDIGIT(line[0]) && ISDIGIT(line[1]) && ISDIGIT(line[2]))
|
||||
(ISDIGIT((line)[0]) && ISDIGIT((line)[1]) && ISDIGIT((line)[2]))
|
||||
|
||||
/* macro to check for the last line in an FTP server response */
|
||||
#define LASTLINE(line) (STATUSCODE(line) && (' ' == line[3]))
|
||||
#define LASTLINE(line) (STATUSCODE(line) && (' ' == (line)[3]))
|
||||
|
||||
#ifdef CURLVERBOSE
|
||||
/* for tracing purposes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue