From 2119647f7d7209532c7ae9f1dc895132074b036d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 29 Jul 2022 19:26:17 +0200 Subject: [PATCH] remove dead code --- include/my_rnd.h | 1 - mysys/my_rnd.c | 22 ---------------------- 2 files changed, 23 deletions(-) diff --git a/include/my_rnd.h b/include/my_rnd.h index a3e3788085d..dc8efbd276e 100644 --- a/include/my_rnd.h +++ b/include/my_rnd.h @@ -25,7 +25,6 @@ struct my_rnd_struct { void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2); double my_rnd(struct my_rnd_struct *rand_st); -double my_rnd_ssl(struct my_rnd_struct *rand_st); C_MODE_END diff --git a/mysys/my_rnd.c b/mysys/my_rnd.c index 0af251b4ade..b1dd8b1f36f 100644 --- a/mysys/my_rnd.c +++ b/mysys/my_rnd.c @@ -64,25 +64,3 @@ double my_rnd(struct my_rnd_struct *rand_st) return (((double) seed1)/rand_st->max_value_dbl); } - -/** - Generate a random number using the OpenSSL/yaSSL supplied - random number generator if available. - - @param rand_st [INOUT] Structure used for number generation - only if none of the SSL libraries are - available. - - @retval Generated random number. -*/ - -double my_rnd_ssl(struct my_rnd_struct *rand_st) -{ -#if defined(HAVE_OPENSSL) - rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int)); - if (rc) - return (double)res / (double)UINT_MAX; -#endif /* defined(HAVE_OPENSSL) */ - - return my_rnd(rand_st); -}