mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-09-20 05:44:56 +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:
@@ -495,7 +495,7 @@ int random_write_entropy(int fd, const void *seed, size_t size, bool credit) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int random_u64_range(uint64_t m) {
|
uint64_t random_u64_range(uint64_t m) {
|
||||||
uint64_t x, remainder;
|
uint64_t x, remainder;
|
||||||
|
|
||||||
/* Generates a random number in the range 0…m-1, unbiased. (Java's algorithm) */
|
/* 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_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);
|
||||||
|
Reference in New Issue
Block a user