mirror of
https://github.com/curl/curl.git
synced 2026-08-02 08:00:29 +03:00
checksrc: warn for assignments within if() expressions
... they're already frowned upon in our source code style guide, this now enforces the rule harder.
This commit is contained in:
parent
b228d2952b
commit
1c3e8bbfed
86 changed files with 413 additions and 226 deletions
|
|
@ -61,13 +61,15 @@ static int _getch(void)
|
|||
#define VERSION_STR "V1.0"
|
||||
|
||||
/* error handling macros */
|
||||
#define my_curl_easy_setopt(A, B, C) \
|
||||
if((res = curl_easy_setopt((A), (B), (C))) != CURLE_OK) \
|
||||
#define my_curl_easy_setopt(A, B, C) \
|
||||
res = curl_easy_setopt((A), (B), (C)); \
|
||||
if(!res) \
|
||||
fprintf(stderr, "curl_easy_setopt(%s, %s, %s) failed: %d\n", \
|
||||
#A, #B, #C, res);
|
||||
|
||||
#define my_curl_easy_perform(A) \
|
||||
if((res = curl_easy_perform((A))) != CURLE_OK) \
|
||||
#define my_curl_easy_perform(A) \
|
||||
res = curl_easy_perform(A); \
|
||||
if(!res) \
|
||||
fprintf(stderr, "curl_easy_perform(%s) failed: %d\n", #A, res);
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue