From cf43d2430184967820436961d93b27193ef5779d Mon Sep 17 00:00:00 2001 From: tb <> Date: Thu, 21 Oct 2021 08:38:11 +0000 Subject: Eliminate a dead assignment and a weird cast. Adjust a comment to reality while there. ok jsing --- src/lib/libtls/tls_client.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib/libtls') diff --git a/src/lib/libtls/tls_client.c b/src/lib/libtls/tls_client.c index c45684dbb4..1629697f8a 100644 --- a/src/lib/libtls/tls_client.c +++ b/src/lib/libtls/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 * @@ -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"); -- cgit v1.2.3-55-g6feb