summaryrefslogtreecommitdiff
path: root/src/tool_setopt.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-06-18 22:30:54 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-06-18 22:31:26 +0200
commitb9e0c6d28c3e89cf27ce15b14a8c2300ad32a4e5 (patch)
treeb219b0509668b432e533a50d58dbbd524204841f /src/tool_setopt.h
parent6c2f9bea70b928067b854f0a17981e3da0c65aeb (diff)
downloadcurl-b9e0c6d28c3e89cf27ce15b14a8c2300ad32a4e5.tar.gz
curl: improved skip-setopt-options when built with disabled features
Reduces #ifdefs in src/tool_operate.c Follow-up from 4e86f2fc4e6 Closes #3936
Diffstat (limited to 'src/tool_setopt.h')
-rw-r--r--src/tool_setopt.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/tool_setopt.h b/src/tool_setopt.h
index 2266d1c9c..690b2c6f3 100644
--- a/src/tool_setopt.h
+++ b/src/tool_setopt.h
@@ -30,13 +30,15 @@
*/
#define SETOPT_CHECK(v,opt) do { \
- result = tool_real_error((v), opt); \
- if(result) \
- goto show_error; \
+ if(!tool_setopt_skip(opt)) { \
+ result = (v); \
+ if(result) \
+ goto show_error; \
+ } \
} WHILE_FALSE
/* allow removed features to simulate success: */
-CURLcode tool_real_error(CURLcode result, CURLoption tag);
+bool tool_setopt_skip(CURLoption tag);
#ifndef CURL_DISABLE_LIBCURL_OPTION