]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
make one call instead of two
authorDaniel Stenberg <daniel@haxx.se>
Tue, 25 May 2004 07:51:06 +0000 (07:51 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 25 May 2004 07:51:06 +0000 (07:51 +0000)
src/main.c

index c1090dca8c7917e82c5407c629d8af409ce24af8..0c7e964f76a2e146fa4593c569cabcb499f3873c 100644 (file)
@@ -3439,8 +3439,9 @@ operate(struct Configurable *config, int argc, char *argv[])
         }
 #else
         if((res!=CURLE_OK) && config->showerror) {
+          fprintf(config->errors, "curl: (%d) %s\n", (int)res,
+                  errorbuffer[0]? errorbuffer: curl_easy_strerror(res));
           if(CURLE_SSL_CACERT == res) {
-            fprintf(config->errors, "curl: (%d) %s\n\n", res, errorbuffer);
 #define CURL_CA_CERT_ERRORMSG1 \
 "More details here: http://curl.haxx.se/docs/sslcerts.html\n\n" \
 "curl performs SSL certificate verification by default, using a \"bundle\"\n" \
@@ -3460,9 +3461,6 @@ operate(struct Configurable *config, int argc, char *argv[])
                     CURL_CA_CERT_ERRORMSG1,
                     CURL_CA_CERT_ERRORMSG2 );
           }
-          else
-            fprintf(config->errors, "curl: (%d) %s\n", res,
-                    errorbuffer[0]? errorbuffer: curl_easy_strerror(res));
         }
 #endif