From 2b0ddb657c4e8342eaf457b70bc8cb1d842bf323 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 20 Jul 2022 23:53:34 +0200 Subject: [PATCH] tool_cfgable: make 'synthetic_error' a plain bool The specific reason was not used. Closes #9179 --- src/tool_cb_wrt.c | 2 +- src/tool_cfgable.h | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index f943889aeed2c9..c9d1dbd1d2809e 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -234,7 +234,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata) warnf(config->global, "Binary output can mess up your terminal. " "Use \"--output -\" to tell curl to output it to your terminal " "anyway, or consider \"--output \" to save to a file.\n"); - config->synthetic_error = ERR_BINARY_TERMINAL; + config->synthetic_error = TRUE; return failure; } } diff --git a/src/tool_cfgable.h b/src/tool_cfgable.h index 9c44f7b4e95489..ec26eebf60c75d 100644 --- a/src/tool_cfgable.h +++ b/src/tool_cfgable.h @@ -28,12 +28,6 @@ #include "tool_urlglob.h" #include "tool_formparse.h" -typedef enum { - ERR_NONE, - ERR_BINARY_TERMINAL = 1, /* binary to terminal detected */ - ERR_LAST -} curl_error; - struct GlobalConfig; struct State { @@ -282,8 +276,7 @@ struct OperationConfig { double expect100timeout; bool suppress_connect_headers; /* suppress proxy CONNECT response headers from user callbacks */ - curl_error synthetic_error; /* if non-zero, it overrides any libcurl - error */ + bool synthetic_error; /* if TRUE, this is tool-internal error */ bool ssh_compression; /* enable/disable SSH compression */ long happy_eyeballs_timeout_ms; /* happy eyeballs timeout in milliseconds. 0 is valid. default: CURL_HET_DEFAULT. */