summaryrefslogtreecommitdiffstats
path: root/apps/openssl.c
diff options
context:
space:
mode:
authorPaul Yang <paulyang.inf@gmail.com>2017-06-13 01:24:02 +0800
committerRich Salz <rsalz@openssl.org>2017-06-12 16:11:05 -0400
commit2234212c3dde887e0b7fa08277d035cd132e2cce (patch)
treeb786145f72f8938a11d4c6fc6ff815e0ae6c43a4 /apps/openssl.c
parent71d8c138cf0a72663cd401d753564eecd8c23289 (diff)
Clean up a bundle of codingstyle stuff in apps directory
Mostly braces and NULL pointer check and also copyright year bump Signed-off-by: Paul Yang <paulyang.inf@gmail.com> Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3657)
Diffstat (limited to 'apps/openssl.c')
-rw-r--r--apps/openssl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/openssl.c b/apps/openssl.c
index e42ee1e6e9..b2d4e6f208 100644
--- a/apps/openssl.c
+++ b/apps/openssl.c
@@ -258,12 +258,12 @@ const OPTIONS exit_options[] = {
static void list_cipher_fn(const EVP_CIPHER *c,
const char *from, const char *to, void *arg)
{
- if (c)
+ if (c != NULL) {
BIO_printf(arg, "%s\n", EVP_CIPHER_name(c));
- else {
- if (!from)
+ } else {
+ if (from == NULL)
from = "<undefined>";
- if (!to)
+ if (to == NULL)
to = "<undefined>";
BIO_printf(arg, "%s => %s\n", from, to);
}
@@ -272,12 +272,12 @@ static void list_cipher_fn(const EVP_CIPHER *c,
static void list_md_fn(const EVP_MD *m,
const char *from, const char *to, void *arg)
{
- if (m)
+ if (m != NULL) {
BIO_printf(arg, "%s\n", EVP_MD_name(m));
- else {
- if (!from)
+ } else {
+ if (from == NULL)
from = "<undefined>";
- if (!to)
+ if (to == NULL)
to = "<undefined>";
BIO_printf((BIO *)arg, "%s => %s\n", from, to);
}