Silence Clang warning about unit'd variable
[openssl.git] / apps / s_client.c
index 8c5412c62665fc64eacac789ac3e097e4199447a..009e5fe8956b86b079874fc8bbcbd482d9a93a36 100644 (file)
@@ -635,8 +635,8 @@ int s_client_main(int argc, char **argv)
     char *CApath = NULL, *CAfile = NULL, *cbuf = NULL, *sbuf = NULL;
     char *mbuf = NULL, *proxystr = NULL, *connectstr = NULL;
     char *cert_file = NULL, *key_file = NULL, *chain_file = NULL, *prog;
-    char *chCApath = NULL, *chCAfile = NULL, *host = SSL_HOST_NAME, *inrand =
-        NULL;
+    char *chCApath = NULL, *chCAfile = NULL, *host = SSL_HOST_NAME;
+    char *inrand = NULL;
     char *passarg = NULL, *pass = NULL, *vfyCApath = NULL, *vfyCAfile = NULL;
     char *sess_in = NULL, *sess_out = NULL, *crl_file = NULL, *p;
     char *jpake_secret = NULL, *xmpphost = NULL;
@@ -1059,6 +1059,9 @@ int s_client_main(int argc, char **argv)
     argc = opt_num_rest();
     argv = opt_rest();
 
+    if (!app_load_modules(NULL))
+        goto end;
+
     if (proxystr) {
         if (connectstr == NULL) {
             BIO_printf(bio_err, "%s: -proxy requires use of -connect\n", prog);
@@ -1067,7 +1070,8 @@ int s_client_main(int argc, char **argv)
         if (!extract_host_port(proxystr, &host, NULL, &port))
             goto end;
     }
-    else if (!extract_host_port(connectstr, &host, NULL, &port))
+    else if (connectstr != NULL
+            && !extract_host_port(connectstr, &host, NULL, &port))
         goto end;
 
     if (unix_path && (socket_type != SOCK_STREAM)) {