diff options
Diffstat (limited to 'tests/prof2d_check.c')
-rw-r--r-- | tests/prof2d_check.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/prof2d_check.c b/tests/prof2d_check.c index 8081748c..9fe8b356 100644 --- a/tests/prof2d_check.c +++ b/tests/prof2d_check.c @@ -73,9 +73,12 @@ int main(int argc, char *argv[]) rng = gsl_rng_alloc(gsl_rng_mt19937); fh = fopen("/dev/urandom", "r"); - fread(&seed, sizeof(seed), 1, fh); + if ( fread(&seed, sizeof(seed), 1, fh) == 1 ) { + gsl_rng_set(rng, seed); + } else { + ERROR("Failed to seed RNG\n"); + } fclose(fh); - gsl_rng_set(rng, seed); image.beam = NULL; image.lambda = ph_eV_to_lambda(9000.0); |