ovs-vsctl: Avoid redundant initializations in "add-br" command.
[openvswitch] / tests / test-vconn.c
index c118af92b4deacf9fa9d3b9aafcac82c4f6f1521..f12e378fca41e71c29b2263be07de0c406794ae2 100644 (file)
@@ -65,11 +65,13 @@ check_errno(int a, int b, const char *as, const char *file, int line)
 static void
 fpv_create(const char *type, struct fake_pvconn *fpv)
 {
+#ifdef HAVE_OPENSSL
     if (!strcmp(type, "ssl")) {
         stream_ssl_set_private_key_file("testpki-privkey.pem");
         stream_ssl_set_certificate_file("testpki-cert.pem");
         stream_ssl_set_ca_cert_file("testpki-cacert.pem", false);
     }
+#endif
 
     fpv->type = type;
     if (!strcmp(type, "unix")) {
@@ -82,7 +84,7 @@ fpv_create(const char *type, struct fake_pvconn *fpv)
         CHECK_ERRNO(pstream_open(fpv->pvconn_name, &fpv->pstream), 0);
         free(bind_path);
     } else if (!strcmp(type, "tcp") || !strcmp(type, "ssl")) {
-        char *s, *method, *port, *save_ptr = NULL;
+        char *s, *port, *save_ptr = NULL;
         char *open_name;
 
         open_name = xasprintf("p%s:0:127.0.0.1", type);
@@ -90,7 +92,7 @@ fpv_create(const char *type, struct fake_pvconn *fpv)
 
         /* Extract bound port number from pstream name. */
         s = xstrdup(pstream_get_name(fpv->pstream));
-        method = strtok_r(s, ":", &save_ptr);
+        strtok_r(s, ":", &save_ptr);
         port = strtok_r(NULL, ":", &save_ptr);
 
         /* Save info. */