From 6faa83bc6ac7cabb012d5d8a772d7ee7b1fb4f3e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 24 May 2004 13:27:48 +0000 Subject: if no errorbuffer string was provided when a return code was returned, use the curl_easy_strerror() function to provide one --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 9c915203c..63461122c 100644 --- a/src/main.c +++ b/src/main.c @@ -3461,7 +3461,8 @@ operate(struct Configurable *config, int argc, char *argv[]) CURL_CA_CERT_ERRORMSG2 ); } else - fprintf(config->errors, "curl: (%d) %s\n", res, errorbuffer); + fprintf(config->errors, "curl: (%d) %s\n", res, + errorbuffer[0]? errorbuffer: curl_easy_strerror(res)); } #endif -- cgit v1.2.3