summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-24 13:27:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-24 13:27:48 +0000
commit6faa83bc6ac7cabb012d5d8a772d7ee7b1fb4f3e (patch)
tree468f17d186bf2ffa2de67f24e4cdc33e7ce09d57 /src
parent9fb4e019fa1860484a07a5293c46e47ff0cd849a (diff)
downloadcurl-6faa83bc6ac7cabb012d5d8a772d7ee7b1fb4f3e.tar.gz
if no errorbuffer string was provided when a return code was returned, use
the curl_easy_strerror() function to provide one
Diffstat (limited to 'src')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
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