diff options
author | tb <> | 2021-10-21 08:38:11 +0000 |
---|---|---|
committer | tb <> | 2021-10-21 08:38:11 +0000 |
commit | cf43d2430184967820436961d93b27193ef5779d (patch) | |
tree | 445671836fdd6279325e7c3f2b605da8bbfb0316 /src/lib/libtls | |
parent | ce6e722c9a83684776190082c63151b5a938ccd7 (diff) | |
download | openbsd-cf43d2430184967820436961d93b27193ef5779d.tar.gz openbsd-cf43d2430184967820436961d93b27193ef5779d.tar.bz2 openbsd-cf43d2430184967820436961d93b27193ef5779d.zip |
Eliminate a dead assignment and a weird cast. Adjust a comment to
reality while there.
ok jsing
Diffstat (limited to 'src/lib/libtls')
-rw-r--r-- | src/lib/libtls/tls_client.c | 9 |
1 files changed, 3 insertions, 6 deletions
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 @@ | |||
1 | /* $OpenBSD: tls_client.c,v 1.47 2021/06/01 20:26:11 tb Exp $ */ | 1 | /* $OpenBSD: tls_client.c,v 1.48 2021/10/21 08:38:11 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -74,11 +74,8 @@ tls_connect_servername(struct tls *ctx, const char *host, const char *port, | |||
74 | goto err; | 74 | goto err; |
75 | } | 75 | } |
76 | 76 | ||
77 | /* | 77 | /* If port is NULL, try to extract a port from the specified host. */ |
78 | * If port is NULL try to extract a port from the specified host, | 78 | if (port == NULL) { |
79 | * otherwise use the default. | ||
80 | */ | ||
81 | if ((p = (char *)port) == NULL) { | ||
82 | ret = tls_host_port(host, &hs, &ps); | 79 | ret = tls_host_port(host, &hs, &ps); |
83 | if (ret == -1) { | 80 | if (ret == -1) { |
84 | tls_set_errorx(ctx, "memory allocation failure"); | 81 | tls_set_errorx(ctx, "memory allocation failure"); |