Skip to content

Commit

Permalink
tool_cfgable: make 'synthetic_error' a plain bool
Browse files Browse the repository at this point in the history
The specific reason was not used.

Closes #9179
  • Loading branch information
bagder committed Jul 23, 2022
1 parent 3f533a7 commit 2b0ddb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/tool_cb_wrt.c
Expand Up @@ -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 <FILE>\" to save to a file.\n");
config->synthetic_error = ERR_BINARY_TERMINAL;
config->synthetic_error = TRUE;
return failure;
}
}
Expand Down
9 changes: 1 addition & 8 deletions src/tool_cfgable.h
Expand Up @@ -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 {
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 2b0ddb6

Please sign in to comment.