From 1ad3c784cb5a6f09eb35a87556f57f9a129ac572 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 10 Feb 2018 04:48:44 +0000 Subject: Tidy/standardise some code. --- src/lib/libtls/tls_conninfo.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libtls/tls_conninfo.c b/src/lib/libtls/tls_conninfo.c index 208d1e1062..8e479ed84c 100644 --- a/src/lib/libtls/tls_conninfo.c +++ b/src/lib/libtls/tls_conninfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_conninfo.c,v 1.19 2018/02/10 04:48:17 jsing Exp $ */ +/* $OpenBSD: tls_conninfo.c,v 1.20 2018/02/10 04:48:44 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -244,8 +244,7 @@ tls_conninfo_populate(struct tls *ctx) if ((tmp = SSL_get_cipher(ctx->ssl_conn)) == NULL) goto err; - ctx->conninfo->cipher = strdup(tmp); - if (ctx->conninfo->cipher == NULL) + if ((ctx->conninfo->cipher = strdup(tmp)) == NULL) goto err; if (ctx->servername != NULL) { @@ -256,8 +255,7 @@ tls_conninfo_populate(struct tls *ctx) if ((tmp = SSL_get_version(ctx->ssl_conn)) == NULL) goto err; - ctx->conninfo->version = strdup(tmp); - if (ctx->conninfo->version == NULL) + if ((ctx->conninfo->version = strdup(tmp)) == NULL) goto err; if (tls_get_peer_cert_info(ctx) == -1) @@ -337,4 +335,3 @@ tls_conn_version(struct tls *ctx) return (NULL); return (ctx->conninfo->version); } - -- cgit v1.2.3-55-g6feb