diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-06-18 22:30:54 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-06-18 22:31:26 +0200 |
commit | b9e0c6d28c3e89cf27ce15b14a8c2300ad32a4e5 (patch) | |
tree | b219b0509668b432e533a50d58dbbd524204841f /src/tool_setopt.h | |
parent | 6c2f9bea70b928067b854f0a17981e3da0c65aeb (diff) | |
download | curl-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.h | 10 |
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 |