]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
if no errorbuffer string was provided when a return code was returned, use
authorDaniel Stenberg <daniel@haxx.se>
Mon, 24 May 2004 13:27:48 +0000 (13:27 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 24 May 2004 13:27:48 +0000 (13:27 +0000)
the curl_easy_strerror() function to provide one

src/main.c

index 9c915203c788e24c0ccf29eefe35dacd2fb17d66..63461122cf64656184f168d61bf28ade63e15cd1 100644 (file)
@@ -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