summaryrefslogtreecommitdiffstats
path: root/apps/app_rand.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/app_rand.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/app_rand.c')
-rw-r--r--apps/app_rand.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/app_rand.c b/apps/app_rand.c
index 0d44af903b..8a85cc9114 100644
--- a/apps/app_rand.c
+++ b/apps/app_rand.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -19,18 +19,19 @@ int app_RAND_load_file(const char *file, int dont_warn)
int consider_randfile = (file == NULL);
char buffer[200];
- if (file == NULL)
+ if (file == NULL) {
file = RAND_file_name(buffer, sizeof buffer);
#ifndef OPENSSL_NO_EGD
- else if (RAND_egd(file) > 0) {
+ } else if (RAND_egd(file) > 0) {
/*
* we try if the given filename is an EGD socket. if it is, we don't
* write anything back to the file.
*/
egdsocket = 1;
return 1;
- }
#endif
+ }
+
if (file == NULL || !RAND_load_file(file, -1)) {
if (RAND_status() == 0) {
if (!dont_warn) {