diff options
author | 2016-08-22 17:08:10 +0000 | |
---|---|---|
committer | 2016-08-22 17:08:10 +0000 | |
commit | b50cee5a2fb875c448e4a9a665f09cf28335d0b6 (patch) | |
tree | 3f9fa95fc4baca76fcecce9c8a0f5bb9571d1c49 /lib | |
parent | Sync counters now that ifa_ifwithroute() no longer uses ifa_ifwithnet(). (diff) | |
download | wireguard-openbsd-b50cee5a2fb875c448e4a9a665f09cf28335d0b6.tar.xz wireguard-openbsd-b50cee5a2fb875c448e4a9a665f09cf28335d0b6.zip |
Stick with the usual 'if NULL return NULL' idiom.
ok beck@
Diffstat (limited to 'lib')
-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 |