mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
* fix pa_random_seet() function prototype
* drop pa_ prefix from pa_random_proper(), because it is a static function git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@745 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
c22a0c12e4
commit
f8dbc2f8f8
2 changed files with 5 additions and 5 deletions
|
|
@ -40,7 +40,7 @@ static int has_whined = 0;
|
|||
|
||||
static const char *devices[] = { "/dev/urandom", "/dev/random", NULL };
|
||||
|
||||
static int pa_random_proper(void *ret_data, size_t length) {
|
||||
static int random_proper(void *ret_data, size_t length) {
|
||||
assert(ret_data && length);
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
|
|
@ -75,10 +75,10 @@ static int pa_random_proper(void *ret_data, size_t length) {
|
|||
#endif /* OS_IS_WIN32 */
|
||||
}
|
||||
|
||||
void pa_random_seed() {
|
||||
void pa_random_seed(void) {
|
||||
unsigned int seed;
|
||||
|
||||
if (pa_random_proper(&seed, sizeof(unsigned int)) < 0) {
|
||||
if (random_proper(&seed, sizeof(unsigned int)) < 0) {
|
||||
if (!has_whined)
|
||||
pa_log_warn(__FILE__": failed to get proper entropy. Falling back to seeding with current time.");
|
||||
has_whined = 1;
|
||||
|
|
@ -95,7 +95,7 @@ void pa_random(void *ret_data, size_t length) {
|
|||
|
||||
assert(ret_data && length);
|
||||
|
||||
if (pa_random_proper(ret_data, length) >= 0)
|
||||
if (random_proper(ret_data, length) >= 0)
|
||||
return;
|
||||
|
||||
if (!has_whined)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
USA.
|
||||
***/
|
||||
|
||||
void pa_random_seed();
|
||||
void pa_random_seed(void);
|
||||
void pa_random(void *ret_data, size_t length);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue