summary refs log tree commit diff
path: root/tls_client.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
committerJune McEnroe <june@causal.agency>2022-02-27 09:57:33 -0500
commit913a7ee3584b9cdb05b473123b529677f16e4e0b (patch)
tree45ed028bf5e09339cd815eb1277b6343213d44b6 /tls_client.c
parentImport LibreSSL 3.4.2 (diff)
downloadlibretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.tar.gz
libretls-913a7ee3584b9cdb05b473123b529677f16e4e0b.zip
Import LibreSSL 3.5.0
Diffstat (limited to '')
-rw-r--r--tls_client.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tls_client.c b/tls_client.c
index c45684d..1629697 100644
--- a/tls_client.c
+++ b/tls_client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_client.c,v 1.47 2021/06/01 20:26:11 tb Exp $ */
+/* $OpenBSD: tls_client.c,v 1.48 2021/10/21 08:38:11 tb Exp $ */
 /*
  * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
  *
@@ -74,11 +74,8 @@ tls_connect_servername(struct tls *ctx, const char *host, const char *port,
 		goto err;
 	}
 
-	/*
-	 * If port is NULL try to extract a port from the specified host,
-	 * otherwise use the default.
-	 */
-	if ((p = (char *)port) == NULL) {
+	/* If port is NULL, try to extract a port from the specified host. */
+	if (port == NULL) {
 		ret = tls_host_port(host, &hs, &ps);
 		if (ret == -1) {
 			tls_set_errorx(ctx, "memory allocation failure");