mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
random-util: fix type of random_u64_range()
As the name of the function suggests this is supposed to return uint64_t, of course. Fix it. Not sure how this mistake happened in the first place...
This commit is contained in:
parent
e55daa2599
commit
1a8900e7ed
@ -495,7 +495,7 @@ int random_write_entropy(int fd, const void *seed, size_t size, bool credit) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int random_u64_range(uint64_t m) {
|
||||
uint64_t random_u64_range(uint64_t m) {
|
||||
uint64_t x, remainder;
|
||||
|
||||
/* Generates a random number in the range 0…m-1, unbiased. (Java's algorithm) */
|
||||
|
@ -41,4 +41,4 @@ size_t random_pool_size(void);
|
||||
|
||||
int random_write_entropy(int fd, const void *seed, size_t size, bool credit);
|
||||
|
||||
int random_u64_range(uint64_t max);
|
||||
uint64_t random_u64_range(uint64_t max);
|
||||
|
Loading…
Reference in New Issue
Block a user