From 3c5ff730c4d5644ecd059a5e3897cdbff13e0126 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 28 Sep 2015 15:18:08 +0000 Subject: Explicit NULL checks and style(9) tweaks. --- src/lib/libtls/tls_conninfo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib') 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 @@ -/* $OpenBSD: tls_conninfo.c,v 1.2 2015/09/13 10:32:46 beck Exp $ */ +/* $OpenBSD: tls_conninfo.c,v 1.3 2015/09/28 15:18:08 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -161,15 +161,15 @@ tls_free_conninfo(struct tls_conninfo *conninfo) { const char * tls_conn_cipher(struct tls *ctx) { - if (ctx->conninfo) - return (ctx->conninfo->cipher); - return NULL; + if (ctx->conninfo == NULL) + return (NULL); + return (ctx->conninfo->cipher); } const char * tls_conn_version(struct tls *ctx) { - if (ctx->conninfo) - return (ctx->conninfo->version); - return NULL; + if (ctx->conninfo == NULL) + return (NULL); + return (ctx->conninfo->version); } -- cgit v1.2.3-55-g6feb