mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
initialize random seed globaly from $RANDOM_DEVICE
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@719 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
d50255ac1e
commit
0990d8c796
2 changed files with 25 additions and 6 deletions
|
|
@ -36,10 +36,6 @@
|
|||
|
||||
#include "random.h"
|
||||
|
||||
#ifndef OS_IS_WIN32
|
||||
#define RANDOM_DEVICE "/dev/urandom"
|
||||
#endif
|
||||
|
||||
void pa_random(void *ret_data, size_t length) {
|
||||
int fd;
|
||||
ssize_t r = 0;
|
||||
|
|
@ -64,8 +60,6 @@ void pa_random(void *ret_data, size_t length) {
|
|||
", falling back to unsecure pseudo RNG.\n", strerror(errno));
|
||||
#endif
|
||||
|
||||
srand(time(NULL));
|
||||
|
||||
for (p = ret_data, l = length; l > 0; p++, l--)
|
||||
*p = (uint8_t) rand();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue