diff options
author | 2015-09-28 15:18:08 +0000 | |
---|---|---|
committer | 2015-09-28 15:18:08 +0000 | |
commit | 0112cb754f8fcac9c434990b65aaf1637584f1fb (patch) | |
tree | c4221e5fb764b1628a71d29c80da34561966e9fa /lib/libtls/tls_conninfo.c | |
parent | Mechanical changes from manual buf set up to readdisksector(). (diff) | |
download | wireguard-openbsd-0112cb754f8fcac9c434990b65aaf1637584f1fb.tar.xz wireguard-openbsd-0112cb754f8fcac9c434990b65aaf1637584f1fb.zip |
Explicit NULL checks and style(9) tweaks.
Diffstat (limited to 'lib/libtls/tls_conninfo.c')
-rw-r--r-- | lib/libtls/tls_conninfo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libtls/tls_conninfo.c b/lib/libtls/tls_conninfo.c index 0c99741b635..86fca2337d2 100644 --- a/lib/libtls/tls_conninfo.c +++ b/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 <jsing@openbsd.org> * Copyright (c) 2015 Bob Beck <beck@openbsd.org> @@ -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); } |