From bcc6bdfd072b978bd3c76d5d543cb0053aef595d Mon Sep 17 00:00:00 2001 From: jsing <> Date: Mon, 22 Aug 2016 17:08:10 +0000 Subject: Stick with the usual 'if NULL return NULL' idiom. ok beck@ --- src/lib/libtls/tls_peer.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libtls/tls_peer.c b/src/lib/libtls/tls_peer.c index 8a74613ef8..802a9c2780 100644 --- a/src/lib/libtls/tls_peer.c +++ b/src/lib/libtls/tls_peer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls_peer.c,v 1.5 2015/10/07 23:33:38 beck Exp $ */ +/* $OpenBSD: tls_peer.c,v 1.6 2016/08/22 17:08:10 jsing Exp $ */ /* * Copyright (c) 2015 Joel Sing * Copyright (c) 2015 Bob Beck @@ -26,24 +26,24 @@ const char * tls_peer_cert_hash(struct tls *ctx) { - if (ctx->conninfo) - return (ctx->conninfo->hash); - return NULL; + if (ctx->conninfo == NULL) + return (NULL); + return (ctx->conninfo->hash); } const char * tls_peer_cert_issuer(struct tls *ctx) { - if (ctx->conninfo) - return (ctx->conninfo->issuer); - return NULL; + if (ctx->conninfo == NULL) + return (NULL); + return (ctx->conninfo->issuer); } const char * tls_peer_cert_subject(struct tls *ctx) { - if (ctx->conninfo) - return (ctx->conninfo->subject); - return NULL; + if (ctx->conninfo == NULL) + return (NULL); + return (ctx->conninfo->subject); } int -- cgit v1.2.3-55-g6feb