summaryrefslogtreecommitdiffstats
path: root/providers/implementations/rands
diff options
context:
space:
mode:
authorx2018 <xkernel.wang@foxmail.com>2021-10-26 15:16:18 +0800
committerPauli <pauli@openssl.org>2021-10-28 13:10:46 +1000
commit1287dabd0b23326be491125698dd982e4ae28887 (patch)
tree3d6a62803bdd3d8ca9378eda3e7316a9c995c001 /providers/implementations/rands
parent01451721afebabd0b7bdcd4cb3a183c9b590d266 (diff)
fix some code with obvious wrong coding style
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16918)
Diffstat (limited to 'providers/implementations/rands')
-rw-r--r--providers/implementations/rands/drbg_hash.c4
-rw-r--r--providers/implementations/rands/seeding/rand_unix.c2
-rw-r--r--providers/implementations/rands/seeding/rand_vms.c2
-rw-r--r--providers/implementations/rands/seeding/rand_vxworks.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c
index 6deb0a2925..99853a7979 100644
--- a/providers/implementations/rands/drbg_hash.c
+++ b/providers/implementations/rands/drbg_hash.c
@@ -113,7 +113,7 @@ static int hash_df(PROV_DRBG *drbg, unsigned char *out,
memcpy(out, vtmp, outlen);
OPENSSL_cleanse(vtmp, hash->blocklen);
break;
- } else if(!EVP_DigestFinal(ctx, out, NULL)) {
+ } else if (!EVP_DigestFinal(ctx, out, NULL)) {
return 0;
}
@@ -212,7 +212,7 @@ static int hash_gen(PROV_DRBG *drbg, unsigned char *out, size_t outlen)
if (outlen == 0)
return 1;
memcpy(hash->vtmp, hash->V, drbg->seedlen);
- for(;;) {
+ for (;;) {
if (!EVP_DigestInit_ex(hash->ctx, ossl_prov_digest_md(&hash->digest),
NULL)
|| !EVP_DigestUpdate(hash->ctx, hash->vtmp, drbg->seedlen))
diff --git a/providers/implementations/rands/seeding/rand_unix.c b/providers/implementations/rands/seeding/rand_unix.c
index 750afca58e..f394927dae 100644
--- a/providers/implementations/rands/seeding/rand_unix.c
+++ b/providers/implementations/rands/seeding/rand_unix.c
@@ -176,7 +176,7 @@ size_t ossl_pool_acquire_entropy(RAND_POOL *pool)
/* Get wall clock time, take 8 bits. */
clock_gettime(CLOCK_REALTIME, &ts);
v = (unsigned char)(ts.tv_nsec & 0xFF);
- ossl_rand_pool_add(pool, arg, &v, sizeof(v) , 2);
+ ossl_rand_pool_add(pool, arg, &v, sizeof(v), 2);
}
return ossl_rand_pool_entropy_available(pool);
}
diff --git a/providers/implementations/rands/seeding/rand_vms.c b/providers/implementations/rands/seeding/rand_vms.c
index abc06ffd5b..30a97bf6e4 100644
--- a/providers/implementations/rands/seeding/rand_vms.c
+++ b/providers/implementations/rands/seeding/rand_vms.c
@@ -388,7 +388,7 @@ size_t data_collect_method(RAND_POOL *pool)
uint32_t status;
uint32_t efn;
IOSB iosb;
- $DESCRIPTOR(SYSDEVICE,"SYS$SYSDEVICE:");
+ $DESCRIPTOR(SYSDEVICE, "SYS$SYSDEVICE:");
if ((status = sys$getdviw(EFN$C_ENF, 0, &SYSDEVICE, DVI_items,
0, 0, 0, 0, 0)) != SS$_NORMAL) {
diff --git a/providers/implementations/rands/seeding/rand_vxworks.c b/providers/implementations/rands/seeding/rand_vxworks.c
index 12be9357bf..de26b86e25 100644
--- a/providers/implementations/rands/seeding/rand_vxworks.c
+++ b/providers/implementations/rands/seeding/rand_vxworks.c
@@ -136,7 +136,7 @@ size_t ossl_pool_acquire_entropy(RAND_POOL *pool)
RANDOM_NUM_GEN_STATUS status = randStatus();
if ((status == RANDOM_NUM_GEN_ENOUGH_ENTROPY)
- || (status == RANDOM_NUM_GEN_MAX_ENTROPY) ) {
+ || (status == RANDOM_NUM_GEN_MAX_ENTROPY)) {
result = randBytes(buffer, bytes_needed);
if (result == OK)
ossl_rand_pool_add_end(pool, bytes_needed, 8 * bytes_needed);