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
22
lib/telnet.c
22
lib/telnet.c
|
|
@ -58,20 +58,20 @@
|
|||
|
||||
#define SUBBUFSIZE 512
|
||||
|
||||
#define CURL_SB_CLEAR(x) x->subpointer = x->subbuffer
|
||||
#define CURL_SB_TERM(x) \
|
||||
do { \
|
||||
x->subend = x->subpointer; \
|
||||
CURL_SB_CLEAR(x); \
|
||||
#define CURL_SB_CLEAR(x) x->subpointer = (x)->subbuffer
|
||||
#define CURL_SB_TERM(x) \
|
||||
do { \
|
||||
(x)->subend = (x)->subpointer; \
|
||||
CURL_SB_CLEAR(x); \
|
||||
} while(0)
|
||||
#define CURL_SB_ACCUM(x, c) \
|
||||
do { \
|
||||
if(x->subpointer < (x->subbuffer + sizeof(x->subbuffer))) \
|
||||
*x->subpointer++ = (c); \
|
||||
#define CURL_SB_ACCUM(x, c) \
|
||||
do { \
|
||||
if((x)->subpointer < ((x)->subbuffer + sizeof((x)->subbuffer))) \
|
||||
*(x)->subpointer++ = (c); \
|
||||
} while(0)
|
||||
|
||||
#define CURL_SB_GET(x) ((*x->subpointer++) & 0xff)
|
||||
#define CURL_SB_LEN(x) (x->subend - x->subpointer)
|
||||
#define CURL_SB_GET(x) ((*(x)->subpointer++) & 0xff)
|
||||
#define CURL_SB_LEN(x) ((x)->subend - (x)->subpointer)
|
||||
|
||||
/* For posterity:
|
||||
#define CURL_SB_PEEK(x) ((*x->subpointer)&0xff)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue