summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2015-09-28 15:18:08 +0000
committerjsing <>2015-09-28 15:18:08 +0000
commit3c5ff730c4d5644ecd059a5e3897cdbff13e0126 (patch)
tree01ef1c8ce3c22c69312402babda7427d75cd7fbc
parent81a9ff4d618aad1cddcbc504387436393790da57 (diff)
downloadopenbsd-3c5ff730c4d5644ecd059a5e3897cdbff13e0126.tar.gz
openbsd-3c5ff730c4d5644ecd059a5e3897cdbff13e0126.tar.bz2
openbsd-3c5ff730c4d5644ecd059a5e3897cdbff13e0126.zip
Explicit NULL checks and style(9) tweaks.
-rw-r--r--src/lib/libtls/tls_conninfo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libtls/tls_conninfo.c b/src/lib/libtls/tls_conninfo.c
index 0c99741b63..86fca2337d 100644
--- a/src/lib/libtls/tls_conninfo.c
+++ b/src/lib/libtls/tls_conninfo.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_conninfo.c,v 1.2 2015/09/13 10:32:46 beck Exp $ */ 1/* $OpenBSD: tls_conninfo.c,v 1.3 2015/09/28 15:18:08 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2015 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
@@ -161,15 +161,15 @@ tls_free_conninfo(struct tls_conninfo *conninfo) {
161const char * 161const char *
162tls_conn_cipher(struct tls *ctx) 162tls_conn_cipher(struct tls *ctx)
163{ 163{
164 if (ctx->conninfo) 164 if (ctx->conninfo == NULL)
165 return (ctx->conninfo->cipher); 165 return (NULL);
166 return NULL; 166 return (ctx->conninfo->cipher);
167} 167}
168 168
169const char * 169const char *
170tls_conn_version(struct tls *ctx) 170tls_conn_version(struct tls *ctx)
171{ 171{
172 if (ctx->conninfo) 172 if (ctx->conninfo == NULL)
173 return (ctx->conninfo->version); 173 return (NULL);
174 return NULL; 174 return (ctx->conninfo->version);
175} 175}