diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-08-22 17:08:11 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-08-22 17:08:11 +0000 |
commit | fc8603e1aa9326d4aa018c6266e320c24368e9d3 (patch) | |
tree | 972c3b4cc1781b9efc5a3f9fe19df51696fdadd2 /lib/libtls | |
parent | 4211eddbb784a4efe54aeda29a5964c7c676f92f (diff) |
Stick with the usual 'if NULL return NULL' idiom.
ok beck@
Diffstat (limited to 'lib/libtls')
-rw-r--r-- | lib/libtls/tls_peer.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/libtls/tls_peer.c b/lib/libtls/tls_peer.c index 8a74613ef82..802a9c2780d 100644 --- a/lib/libtls/tls_peer.c +++ b/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 <jsing@openbsd.org> * Copyright (c) 2015 Bob Beck <beck@openbsd.org> @@ -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 |