diff options
author | jsing <> | 2015-09-28 15:18:08 +0000 |
---|---|---|
committer | jsing <> | 2015-09-28 15:18:08 +0000 |
commit | 3c5ff730c4d5644ecd059a5e3897cdbff13e0126 (patch) | |
tree | 01ef1c8ce3c22c69312402babda7427d75cd7fbc | |
parent | 81a9ff4d618aad1cddcbc504387436393790da57 (diff) | |
download | openbsd-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.c | 14 |
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) { | |||
161 | const char * | 161 | const char * |
162 | tls_conn_cipher(struct tls *ctx) | 162 | tls_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 | ||
169 | const char * | 169 | const char * |
170 | tls_conn_version(struct tls *ctx) | 170 | tls_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 | } |