summaryrefslogtreecommitdiff
path: root/src/tool_setopt.h
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-09-22 11:16:34 +0200
committerYang Tse <yangsita@gmail.com>2011-09-22 21:21:20 +0200
commitfb3845a438cad9ef09eb1b0b86388ce99a726502 (patch)
treea4ab735d4fc1a4b0646f0b309c0135f228101532 /src/tool_setopt.h
parent3c3aa09c65a6b06b3291f787c1216188ad2d6649 (diff)
downloadgnurl-fb3845a438cad9ef09eb1b0b86388ce99a726502.tar.gz
gnurl-fb3845a438cad9ef09eb1b0b86388ce99a726502.tar.bz2
gnurl-fb3845a438cad9ef09eb1b0b86388ce99a726502.zip
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.
Diffstat (limited to 'src/tool_setopt.h')
-rw-r--r--src/tool_setopt.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
index e75f328f3..d01c9eb24 100644
--- a/src/tool_setopt.h
+++ b/src/tool_setopt.h
@@ -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)