commit 4b134a9d7ebbe1b314e541339b4b2daf85010e28
parent 7ed7da09762e6a32f60d635a71e2d8b7952a3c1e
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 5 Jun 2015 12:05:16 +0200
Fix a GCC warning
Cosmetic changes on the comments of the random_device API
Diffstat:
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/ssp.h b/src/ssp.h
@@ -74,7 +74,7 @@ struct ssp_rng_type {
res_T (*read)(void* state, FILE* file);
res_T (*write)(const void* state, FILE* file);
double (*entropy)(const void* state);
-
+
uint64_t min;
uint64_t max;
size_t sizeof_state;
@@ -89,15 +89,13 @@ SSP_API const struct ssp_rng_type ssp_rng_kiss;
SSP_API const struct ssp_rng_type ssp_rng_mt19937_64;
/* 48-bits RANLUX builtin PRNG type of Lusher and James, 1994 */
SSP_API const struct ssp_rng_type ssp_rng_ranlux48;
-/*
-random_device generator from Boost / C++11
-std::random_device is a uniformly-distributed integer random number generator
-that produces non-deterministic random numbers.
-std::random_device may be implemented in terms of an implementation-defined
-pseudo-random number engine if a non-deterministic source (e.g. a hardware device)
-is not available to the implementation.
-In this case each std::random_device object may generate the same number sequence.
-*/
+
+/* A random_device RNG is a uniformly-distributed integer random number generator
+ * that produces non-deterministic random numbers. It may may be implemented in
+ * terms of an implementation-defined pseudo-random number engine if a
+ * non-deterministic source (e.g. a hardware device) is not available to the
+ * implementation. In this case each random_device object may generate the same
+ * number sequence. */
SSP_API const struct ssp_rng_type ssp_rng_random_device;
/*******************************************************************************
diff --git a/src/test_ssp_rng.c b/src/test_ssp_rng.c
@@ -133,7 +133,8 @@ test_rng(const struct ssp_rng_type* type)
printf("1,000,000 random numbers in %s\n", buf);
if (can_have_entropy) {
- printf("Entropy for this implementation and system: %lf\n", ssp_rng_entropy(rng));
+ printf("Entropy for this implementation and system: %f\n",
+ ssp_rng_entropy(rng));
}
stream = tmpfile();