mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 02:30:06 +01:00
remove dead code
This commit is contained in:
parent
0caa6bf14e
commit
2119647f7d
2 changed files with 0 additions and 23 deletions
|
@ -25,7 +25,6 @@ struct my_rnd_struct {
|
||||||
|
|
||||||
void my_rnd_init(struct my_rnd_struct *rand_st, ulong seed1, ulong seed2);
|
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(struct my_rnd_struct *rand_st);
|
||||||
double my_rnd_ssl(struct my_rnd_struct *rand_st);
|
|
||||||
|
|
||||||
C_MODE_END
|
C_MODE_END
|
||||||
|
|
||||||
|
|
|
@ -64,25 +64,3 @@ double my_rnd(struct my_rnd_struct *rand_st)
|
||||||
return (((double) seed1)/rand_st->max_value_dbl);
|
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);
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue