diff options
author | Paul Yang <paulyang.inf@gmail.com> | 2017-06-12 19:24:02 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-06-12 22:11:05 +0200 |
commit | 2234212c3dde887e0b7fa08277d035cd132e2cce (patch) | |
tree | b786145f72f8938a11d4c6fc6ff815e0ae6c43a4 /apps/openssl.c | |
parent | Fix a memleak in tls13_generate_secret. (diff) | |
download | openssl-2234212c3dde887e0b7fa08277d035cd132e2cce.tar.xz openssl-2234212c3dde887e0b7fa08277d035cd132e2cce.zip |
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.c | 16 |
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); } |