mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
resolv: make res_randomid use random_bits()
It is at least "more random" than 0xffff & __getpid (); Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
b5c8a3aa82
commit
fa80ce6023
@ -84,9 +84,10 @@
|
||||
|
||||
#include <resolv.h>
|
||||
#include <unistd.h>
|
||||
#include <random-bits.h>
|
||||
|
||||
unsigned int
|
||||
res_randomid (void) {
|
||||
return 0xffff & __getpid ();
|
||||
return 0xffff & random_bits ();
|
||||
}
|
||||
libc_hidden_def (__res_randomid)
|
||||
|
Loading…
Reference in New Issue
Block a user