From: Daniel Stenberg Date: Mon, 24 May 2004 13:27:48 +0000 (+0000) Subject: if no errorbuffer string was provided when a return code was returned, use X-Git-Tag: curl-7_12_0~36 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6faa83bc6ac7cabb012d5d8a772d7ee7b1fb4f3e;p=thirdparty%2Fcurl.git if no errorbuffer string was provided when a return code was returned, use the curl_easy_strerror() function to provide one --- diff --git a/src/main.c b/src/main.c index 9c915203c7..63461122cf 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