mirror of
https://github.com/curl/curl.git
synced 2026-08-25 21:03:34 +03:00
curl tool: reviewed code moved to tool_*.[ch] files
my_setopt and my_setopt_str no longer ignores curl_easy_setopt result. Fixed some OOM handling issues.
This commit is contained in:
parent
3c3aa09c65
commit
fb3845a438
9 changed files with 385 additions and 142 deletions
|
|
@ -29,22 +29,18 @@ CURLcode tool_setopt(CURL *curl, bool str, struct Configurable *config,
|
|||
/*
|
||||
* Macros used in operate()
|
||||
*/
|
||||
#if 0
|
||||
|
||||
#define my_setopt(x,y,z) do { \
|
||||
res = tool_setopt(x, FALSE, config, #y, y, z); \
|
||||
if(res) \
|
||||
goto quit_curl; \
|
||||
goto show_error; \
|
||||
} WHILE_FALSE
|
||||
|
||||
#define my_setopt_str(x,y,z) do { \
|
||||
res = tool_setopt(x, TRUE, config, #y, y, z); \
|
||||
if(res) \
|
||||
goto quit_curl; \
|
||||
goto show_error; \
|
||||
} WHILE_FALSE
|
||||
#else
|
||||
#define my_setopt(x,y,z) tool_setopt(x, FALSE, config, #y, y, z)
|
||||
#define my_setopt_str(x,y,z) tool_setopt(x, TRUE, config, #y, y, z)
|
||||
#endif
|
||||
|
||||
#define res_setopt(x,y,z) tool_setopt(x, FALSE, config, #y, y, z)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue